Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[58acde]: src / buildgsl_sf.sh Maximize Restore History

Download this file

buildgsl_sf.sh    1204 lines (933 with data), 35.8 kB

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
## Copyright (C) 2004 Teemu Ikonen <tpikonen@pcu.helsinki.fi>
##
## This program is free software; you can 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, see <http://www.gnu.org/licenses/>.
# list of missing functions surrounded by spaces
#
#
# R. Rogers 4/23/2008 Added Confluent hypergeometric entries replace "'s"
# "\'s" for descriptions; in other cases removed. If you have
# with this blame the klutz (me).
# R. Rogers 6/18/2008 Added some ellint documentation.
#
missing=" $* "
cat <<EOF >gsl_sf.cc
// *** DO NOT EDIT *** this file is generated by buildgsl_sf.sh
EOF
cat precode.cc.template >> gsl_sf.cc
# double to double
export octave_name=clausen
export funcname=gsl_sf_clausen
cat << \EOF > docstring.txt
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)).
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=dawson
export funcname=gsl_sf_dawson
cat << \EOF > docstring.txt
The Dawson integral is defined by \exp(-x^2) \int_0^x dt \exp(t^2).
A table of Dawson integral can be found in Abramowitz & Stegun, Table 7.5.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=debye_1
export funcname=gsl_sf_debye_1
cat << \EOF > docstring.txt
The Debye functions are defined by the 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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=debye_2
export funcname=gsl_sf_debye_2
cat << \EOF > docstring.txt
The Debye functions are defined by the 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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=debye_3
export funcname=gsl_sf_debye_3
cat << \EOF > docstring.txt
The Debye functions are defined by the 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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=debye_4
export funcname=gsl_sf_debye_4
cat << \EOF > docstring.txt
The Debye functions are defined by the 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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=erf_gsl
export funcname=gsl_sf_erf
cat << \EOF > docstring.txt
These routines compute the error function
erf(x) = (2/\sqrt(\pi)) \int_0^x dt \exp(-t^2).
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=erfc_gsl
export funcname=gsl_sf_erfc
cat << \EOF > docstring.txt
These routines compute the complementary error function
erfc(x) = 1 - erf(x) = (2/\sqrt(\pi)) \int_x^\infty \exp(-t^2).
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=log_erfc
export funcname=gsl_sf_log_erfc
cat << \EOF > docstring.txt
These routines compute the logarithm of the complementary error
function \log(\erfc(x)).
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=erf_Z
export funcname=gsl_sf_erf_Z
cat << \EOF > docstring.txt
These routines compute the Gaussian probability function
Z(x) = (1/(2\pi)) \exp(-x^2/2).
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=erf_Q
export funcname=gsl_sf_erf_Q
cat << \EOF > docstring.txt
These routines compute the upper tail of the Gaussian probability
function Q(x) = (1/(2\pi)) \int_x^\infty dt \exp(-t^2/2).
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
if test -n "${missing##* hazard *}"; then
export octave_name=hazard
export funcname=gsl_sf_hazard
cat << \EOF > docstring.txt
The hazard function for the normal distrbution, also known as the
inverse Mill\'s 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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
fi
export octave_name=expm1
export funcname=gsl_sf_expm1
cat << \EOF > docstring.txt
These routines compute the quantity \exp(x)-1 using an algorithm that
is accurate for small x.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=exprel
export funcname=gsl_sf_exprel
cat << \EOF > docstring.txt
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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=exprel_2
export funcname=gsl_sf_exprel_2
cat << \EOF > docstring.txt
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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=expint_E1
export funcname=gsl_sf_expint_E1
cat << \EOF > docstring.txt
These routines compute the exponential integral E_1(x),
E_1(x) := Re \int_1^\infty dt \exp(-xt)/t.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=expint_E2
export funcname=gsl_sf_expint_E2
cat << \EOF > docstring.txt
These routines compute the second-order exponential integral E_2(x),
E_2(x) := \Re \int_1^\infty dt \exp(-xt)/t^2.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=expint_Ei
export funcname=gsl_sf_expint_Ei
cat << \EOF > docstring.txt
These routines compute the exponential integral E_i(x),
Ei(x) := - PV(\int_@{-x@}^\infty dt \exp(-t)/t)
where PV denotes the principal value of the integral.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=Shi
export funcname=gsl_sf_Shi
cat << \EOF > docstring.txt
These routines compute the integral Shi(x) = \int_0^x dt \sinh(t)/t.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=Chi
export funcname=gsl_sf_Chi
cat << \EOF > docstring.txt
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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=expint_3
export funcname=gsl_sf_expint_3
cat << \EOF > docstring.txt
These routines compute the exponential integral
Ei_3(x) = \int_0^x dt \exp(-t^3) for x >= 0.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=Si
export funcname=gsl_sf_Si
cat << \EOF > docstring.txt
These routines compute the Sine integral Si(x) = \int_0^x dt \sin(t)/t.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=Ci
export funcname=gsl_sf_Ci
cat << \EOF > docstring.txt
These routines compute the Cosine integral
Ci(x) = -\int_x^\infty dt \cos(t)/t for x > 0.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=atanint
export funcname=gsl_sf_atanint
cat << \EOF > docstring.txt
These routines compute the Arctangent integral
AtanInt(x) = \int_0^x dt \arctan(t)/t.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=fermi_dirac_mhalf
export funcname=gsl_sf_fermi_dirac_mhalf
cat << \EOF > docstring.txt
These routines compute the complete Fermi-Dirac integral F_@{-1/2@}(x).
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=fermi_dirac_half
export funcname=gsl_sf_fermi_dirac_half
cat << \EOF > docstring.txt
These routines compute the complete Fermi-Dirac integral F_@{1/2@}(x).
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=fermi_dirac_3half
export funcname=gsl_sf_fermi_dirac_3half
cat << \EOF > docstring.txt
These routines compute the complete Fermi-Dirac integral F_@{3/2@}(x).
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=gamma_gsl
export funcname=gsl_sf_gamma
cat << \EOF > docstring.txt
These routines compute the Gamma function \Gamma(x), subject to x not
being a negative integer. 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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=lngamma_gsl
export funcname=gsl_sf_lngamma
cat << \EOF > docstring.txt
These routines compute the logarithm of the Gamma function,
\log(\Gamma(x)), subject to x not a being negative integer.
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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=gammastar
export funcname=gsl_sf_gammastar
cat << \EOF > docstring.txt
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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=gammainv_gsl
export funcname=gsl_sf_gammainv
cat << \EOF > docstring.txt
These routines compute the reciprocal of the gamma function, 1/\Gamma(x) using the real Lanczos method.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=lambert_W0
export funcname=gsl_sf_lambert_W0
cat << \EOF > docstring.txt
These compute the principal branch of the Lambert W function, W_0(x).
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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=lambert_Wm1
export funcname=gsl_sf_lambert_Wm1
cat << \EOF > docstring.txt
These compute the secondary real-valued branch of the Lambert
W function, W_@{-1@}(x).
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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=log_1plusx
export funcname=gsl_sf_log_1plusx
cat << \EOF > docstring.txt
These routines compute \log(1 + x) for x > -1 using an algorithm that
is accurate for small x.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=log_1plusx_mx
export funcname=gsl_sf_log_1plusx_mx
cat << \EOF > docstring.txt
These routines compute \log(1 + x) - x for x > -1 using an algorithm
that is accurate for small x.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=psi
export funcname=gsl_sf_psi
cat << \EOF > docstring.txt
These routines compute the digamma function \psi(x) for general x,
x \ne 0.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=psi_1piy
export funcname=gsl_sf_psi_1piy
cat << \EOF > docstring.txt
These routines compute the real part of the digamma function on
the line 1+i y, Re[\psi(1 + i y)].
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=synchrotron_1
export funcname=gsl_sf_synchrotron_1
cat << \EOF > docstring.txt
These routines compute the first synchrotron function
x \int_x^\infty dt K_@{5/3@}(t) for x >= 0.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=synchrotron_2
export funcname=gsl_sf_synchrotron_2
cat << \EOF > docstring.txt
These routines compute the second synchrotron function
x K_@{2/3@}(x) for x >= 0.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=transport_2
export funcname=gsl_sf_transport_2
cat << \EOF > docstring.txt
These routines compute the transport function J(2,x).
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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=transport_3
export funcname=gsl_sf_transport_3
cat << \EOF > docstring.txt
These routines compute the transport function J(3,x).
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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=transport_4
export funcname=gsl_sf_transport_4
cat << \EOF > docstring.txt
These routines compute the transport function J(4,x).
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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=transport_5
export funcname=gsl_sf_transport_5
cat << \EOF > docstring.txt
These routines compute the transport function J(5,x).
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.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=sinc_gsl
export funcname=gsl_sf_sinc
cat << \EOF > docstring.txt
These routines compute \sinc(x) = \sin(\pi x) / (\pi x) for any value of x.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=lnsinh
export funcname=gsl_sf_lnsinh
cat << \EOF > docstring.txt
These routines compute \log(\sinh(x)) for x > 0.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=lncosh
export funcname=gsl_sf_lncosh
cat << \EOF > docstring.txt
These routines compute \log(\cosh(x)) for any x.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=zeta
export funcname=gsl_sf_zeta
cat << \EOF > docstring.txt
These routines compute the Riemann zeta function \zeta(s) for
arbitrary s, s \ne 1.
The Riemann zeta function is defined by the infinite sum
\zeta(s) = \sum_@{k=1@}^\infty k^@{-s@}.
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
export octave_name=eta
export funcname=gsl_sf_eta
cat << \EOF > docstring.txt
These routines compute the eta function \eta(s) for arbitrary s.
The eta function is defined by \eta(s) = (1-2^@{1-s@}) \zeta(s).
EOF
./replace_template.sh double_to_double.cc.template >> gsl_sf.cc
# (int, double) to double
export octave_name=bessel_Jn
export funcname=gsl_sf_bessel_Jn
cat << \EOF > docstring.txt
These routines compute the regular cylindrical Bessel function of
order n, J_n(x).
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_Yn
export funcname=gsl_sf_bessel_Yn
cat << \EOF > docstring.txt
These routines compute the irregular cylindrical Bessel function of
order n, Y_n(x), for x>0.
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_In
export funcname=gsl_sf_bessel_In
cat << \EOF > docstring.txt
These routines compute the regular modified cylindrical Bessel
function of order n, I_n(x).
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_In_scaled
export funcname=gsl_sf_bessel_In_scaled
cat << \EOF > docstring.txt
These routines compute the scaled regular modified cylindrical Bessel
function of order n, \exp(-|x|) I_n(x)
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_Kn
export funcname=gsl_sf_bessel_Kn
cat << \EOF > docstring.txt
These routines compute the irregular modified cylindrical Bessel
function of order n, K_n(x), for x > 0.
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_Kn_scaled
export funcname=gsl_sf_bessel_Kn_scaled
cat << \EOF > docstring.txt
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_jl
export funcname=gsl_sf_bessel_jl
cat << \EOF > docstring.txt
These routines compute the regular spherical Bessel function of
order l, j_l(x), for l >= 0 and x >= 0.
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_yl
export funcname=gsl_sf_bessel_yl
cat << \EOF > docstring.txt
These routines compute the irregular spherical Bessel function of
order l, y_l(x), for l >= 0.
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_il_scaled
export funcname=gsl_sf_bessel_il_scaled
cat << \EOF > docstring.txt
These routines compute the scaled regular modified spherical Bessel
function of order l, \exp(-|x|) i_l(x)
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_kl_scaled
export funcname=gsl_sf_bessel_kl_scaled
cat << \EOF > docstring.txt
These routines compute the scaled irregular modified spherical Bessel
function of order l, \exp(x) k_l(x), for x>0.
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=exprel_n
export funcname=gsl_sf_exprel_n
cat << \EOF > docstring.txt
These routines compute the N-relative exponential, which is the n-th
generalization of the functions gsl_sf_exprel and gsl_sf_exprel2. 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)
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=fermi_dirac_int
export funcname=gsl_sf_fermi_dirac_int
cat << \EOF > docstring.txt
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)).
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=taylorcoeff
export funcname=gsl_sf_taylorcoeff
cat << \EOF > docstring.txt
These routines compute the Taylor coefficient x^n / n!
for x >= 0, n >= 0.
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=legendre_Pl
export funcname=gsl_sf_legendre_Pl
cat << \EOF > docstring.txt
These functions evaluate the Legendre polynomial P_l(x) for a specific
value of l, x subject to l >= 0, |x| <= 1
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=legendre_Ql
export funcname=gsl_sf_legendre_Ql
cat << \EOF > docstring.txt
These routines compute the Legendre function Q_l(x) for x > -1, x != 1
and l >= 0.
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=psi_n
export funcname=gsl_sf_psi_n
cat << \EOF > docstring.txt
These routines compute the polygamma function \psi^@{(m)@}(x)
for m >= 0, x > 0.
EOF
./replace_template.sh int_double_to_double.cc.template >> gsl_sf.cc
# (double, double) to double
export octave_name=bessel_Jnu
export funcname=gsl_sf_bessel_Jnu
cat << \EOF > docstring.txt
These routines compute the regular cylindrical Bessel function of
fractional order nu, J_\nu(x).
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_Ynu
export funcname=gsl_sf_bessel_Ynu
cat << \EOF > docstring.txt
These routines compute the irregular cylindrical Bessel function of
fractional order nu, Y_\nu(x).
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_Inu
export funcname=gsl_sf_bessel_Inu
cat << \EOF > docstring.txt
These routines compute the regular modified Bessel function of
fractional order nu, I_\nu(x) for x>0, \nu>0.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_Inu_scaled
export funcname=gsl_sf_bessel_Inu_scaled
cat << \EOF > docstring.txt
These routines compute the scaled regular modified Bessel function of
fractional order nu, \exp(-|x|)I_\nu(x) for x>0, \nu>0.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_Knu
export funcname=gsl_sf_bessel_Knu
cat << \EOF > docstring.txt
These routines compute the irregular modified Bessel function of
fractional order nu, K_\nu(x) for x>0, \nu>0.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_lnKnu
export funcname=gsl_sf_bessel_lnKnu
cat << \EOF > docstring.txt
These routines compute the logarithm of the irregular modified Bessel
function of fractional order nu, \ln(K_\nu(x)) for x>0, \nu>0.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_Knu_scaled
export funcname=gsl_sf_bessel_Knu_scaled
cat << \EOF > docstring.txt
These routines compute the scaled irregular modified Bessel function
of fractional order nu, \exp(+|x|) K_\nu(x) for x>0, \nu>0.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=exp_mult
export funcname=gsl_sf_exp_mult
cat << \EOF > docstring.txt
These routines exponentiate x and multiply by the factor y to return
the product y \exp(x).
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=fermi_dirac_inc_0
export funcname=gsl_sf_fermi_dirac_inc_0
cat << \EOF > docstring.txt
These routines compute the incomplete Fermi-Dirac integral with an
index of zero, F_0(x,b) = \ln(1 + e^@{b-x@}) - (b-x).
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=poch
export funcname=gsl_sf_poch
cat << \EOF > docstring.txt
These routines compute the Pochhammer symbol
(a)_x := \Gamma(a + x)/\Gamma(a),
subject to a and a+x not being negative integers. The Pochhammer
symbol is also known as the Apell symbol.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=lnpoch
export funcname=gsl_sf_lnpoch
cat << \EOF > docstring.txt
These routines compute the logarithm of the Pochhammer symbol,
\log((a)_x) = \log(\Gamma(a + x)/\Gamma(a)) for a > 0, a+x > 0.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=pochrel
export funcname=gsl_sf_pochrel
cat << \EOF > docstring.txt
These routines compute the relative Pochhammer symbol ((a,x) - 1)/x
where (a,x) = (a)_x := \Gamma(a + x)/\Gamma(a).
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=gamma_inc_Q
export funcname=gsl_sf_gamma_inc_Q
cat << \EOF > docstring.txt
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.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=gamma_inc_P
export funcname=gsl_sf_gamma_inc_P
cat << \EOF > docstring.txt
These routines compute the complementary normalized incomplete Gamma
Function P(a,x) = 1/\Gamma(a) \int_0^x dt t^@{a-1@} \exp(-t)
for a > 0, x >= 0.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
if test -n "${missing##* gamma_inc *@}"; then
export octave_name=gamma_inc
export funcname=gsl_sf_gamma_inc
cat << \EOF > docstring.txt
These functions compute the incomplete Gamma Function the
normalization factor included in the previously defined functions:
\Gamma(a,x) = \int_x\infty dt t^@{a-1@} \exp(-t) for a real and x >= 0.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
fi
export octave_name=beta_gsl
export funcname=gsl_sf_beta
cat << \EOF > docstring.txt
These routines compute the Beta Function,
B(a,b) = \Gamma(a)\Gamma(b)/\Gamma(a+b) for a > 0, b > 0.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=lnbeta
export funcname=gsl_sf_lnbeta
cat << \EOF > docstring.txt
These routines compute the logarithm of the Beta Function,
\log(B(a,b)) for a > 0, b > 0.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=hyperg_0F1
export funcname=gsl_sf_hyperg_0F1
cat << \EOF > docstring.txt
These routines compute the hypergeometric function 0F1(c,x).
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=conicalP_half
export funcname=gsl_sf_conicalP_half
cat << \EOF > docstring.txt
These routines compute the irregular Spherical Conical Function
P^@{1/2@}_@{-1/2 + i \lambda@}(x) for x > -1.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=conicalP_mhalf
export funcname=gsl_sf_conicalP_mhalf
cat << \EOF > docstring.txt
These routines compute the regular Spherical Conical Function
P^@{-1/2@}_@{-1/2 + i \lambda@}(x) for x > -1.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=conicalP_0
export funcname=gsl_sf_conicalP_0
cat << \EOF > docstring.txt
These routines compute the conical function P^0_@{-1/2 + i \lambda@}(x)
for x > -1.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=conicalP_1
export funcname=gsl_sf_conicalP_1
cat << \EOF > docstring.txt
These routines compute the conical function P^1_@{-1/2 + i \lambda@}(x)
for x > -1.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
export octave_name=hzeta
export funcname=gsl_sf_hzeta
cat << \EOF > docstring.txt
These routines compute the Hurwitz zeta function \zeta(s,q)
for s > 1, q > 0.
EOF
./replace_template.sh double_double_to_double.cc.template >> gsl_sf.cc
# (double, mode) to double
export octave_name=airy_Ai
export funcname=gsl_sf_airy_Ai
cat << \EOF > docstring.txt
These routines compute the Airy function Ai(x) with an accuracy
specified by mode.
EOF
./replace_template.sh double_mode_to_double.cc.template >> gsl_sf.cc
export octave_name=airy_Bi
export funcname=gsl_sf_airy_Bi
cat << \EOF > docstring.txt
These routines compute the Airy function Bi(x) with an accuracy
specified by mode.
EOF
./replace_template.sh double_mode_to_double.cc.template >> gsl_sf.cc
export octave_name=airy_Ai_scaled
export funcname=gsl_sf_airy_Ai_scaled
cat << \EOF > docstring.txt
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.
EOF
./replace_template.sh double_mode_to_double.cc.template >> gsl_sf.cc
export octave_name=airy_Bi_scaled
export funcname=gsl_sf_airy_Bi_scaled
cat << \EOF > docstring.txt
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.
EOF
./replace_template.sh double_mode_to_double.cc.template >> gsl_sf.cc
export octave_name=airy_Ai_deriv
export funcname=gsl_sf_airy_Ai_deriv
cat << \EOF > docstring.txt
These routines compute the Airy function derivative Ai'(x) with an
accuracy specified by mode.
EOF
./replace_template.sh double_mode_to_double.cc.template >> gsl_sf.cc
export octave_name=airy_Bi_deriv
export funcname=gsl_sf_airy_Bi_deriv
cat << \EOF > docstring.txt
These routines compute the Airy function derivative Bi'(x) with an
accuracy specified by mode.
EOF
./replace_template.sh double_mode_to_double.cc.template >> gsl_sf.cc
export octave_name=airy_Ai_deriv_scaled
export funcname=gsl_sf_airy_Ai_deriv_scaled
cat << \EOF > docstring.txt
These routines compute the derivative of the scaled Airy function
S_A(x) Ai(x).
EOF
./replace_template.sh double_mode_to_double.cc.template >> gsl_sf.cc
export octave_name=airy_Bi_deriv_scaled
export funcname=gsl_sf_airy_Bi_deriv_scaled
cat << \EOF > docstring.txt
These routines compute the derivative of the scaled Airy function
S_B(x) Bi(x).
EOF
./replace_template.sh double_mode_to_double.cc.template >> gsl_sf.cc
export octave_name=ellint_Kcomp
export funcname=gsl_sf_ellint_Kcomp
cat << \EOF > docstring.txt
These routines compute the complete elliptic integral K(k)
@tex
\beforedisplay
$$
\eqalign{
K(k) &= \int_0^{\pi/2} {dt \over \sqrt{(1 - k^2 \sin^2(t))}} \cr
}
$$
\afterdisplay
See also:
@end tex
@ifinfo
@group
@example
pi
---
2
/
| 1
ellint_Kcomp(k) = | ------------------- dt
| 2 2
/ sqrt(1 - k sin (t))
0
@end example
@end group
@end ifinfo
@ifhtml
@group
@example
pi
---
2
/
| 1
ellint_Kcomp(k) = | ------------------- dt
| 2 2
/ sqrt(1 - k sin (t))
0
@end example
@end group
@end ifhtml
@seealso{ellipj, ellipke}
The notation used here is based on Carlson, @cite{Numerische
Mathematik} 33 (1979) and differs slightly from that used by
Abramowitz & Stegun, where the functions are given in terms of the
parameter @math{m = k^2}.
EOF
./replace_template.sh double_mode_to_double.cc.template >> gsl_sf.cc
export octave_name=ellint_Ecomp
export funcname=gsl_sf_ellint_Ecomp
cat << \EOF > docstring.txt
These routines compute the complete elliptic integral E(k) to the
accuracy specified by the mode variable mode.
@tex
\beforedisplay
$$
\eqalign{
E(k) &= \int_0^{\pi/2} \sqrt{(1 - k^2 \sin^2(t))} dt \cr
}
$$
\afterdisplay
See also:
@end tex
@ifinfo
@group
@example
pi
---
2
/
| 2 2
ellint_Ecomp(k) = | sqrt(1 - k sin (t)) dt
|
/
0
@end example
@end group
@end ifinfo
@ifhtml
@group
@example
pi
---
2
/
| 2 2
ellint_Ecomp(k) = | sqrt(1 - k sin (t)) dt
|
/
0
@end example
@end group
@end ifhtml
@seealso{ellipj, ellipke}
The notation used here is based on Carlson, @cite{Numerische
Mathematik} 33 (1979) and differs slightly from that used by
Abramowitz & Stegun, where the functions are given in terms of the
parameter @math{m = k^2}.
EOF
./replace_template.sh double_mode_to_double.cc.template >> gsl_sf.cc
# int to double
export octave_name=airy_zero_Ai
export funcname=gsl_sf_airy_zero_Ai
cat << \EOF > docstring.txt
These routines compute the location of the s-th zero of the Airy
function Ai(x).
EOF
./replace_template.sh int_to_double.cc.template >> gsl_sf.cc
export octave_name=airy_zero_Bi
export funcname=gsl_sf_airy_zero_Bi
cat << \EOF > docstring.txt
These routines compute the location of the s-th zero of the Airy
function Bi(x).
EOF
./replace_template.sh int_to_double.cc.template >> gsl_sf.cc
export octave_name=airy_zero_Ai_deriv
export funcname=gsl_sf_airy_zero_Ai_deriv
cat << \EOF > docstring.txt
These routines compute the location of the s-th zero of the Airy
function derivative Ai(x).
EOF
./replace_template.sh int_to_double.cc.template >> gsl_sf.cc
export octave_name=airy_zero_Bi_deriv
export funcname=gsl_sf_airy_zero_Bi_deriv
cat << \EOF > docstring.txt
These routines compute the location of the s-th zero of the Airy
function derivative Bi(x).
EOF
./replace_template.sh int_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_zero_J0
export funcname=gsl_sf_bessel_zero_J0
cat << \EOF > docstring.txt
These routines compute the location of the s-th positive zero of the
Bessel function J_0(x).
EOF
./replace_template.sh int_to_double.cc.template >> gsl_sf.cc
export octave_name=bessel_zero_J1
export funcname=gsl_sf_bessel_zero_J1
cat << \EOF > docstring.txt
These routines compute the location of the s-th positive zero of the
Bessel function J_1(x).
EOF
./replace_template.sh int_to_double.cc.template >> gsl_sf.cc
export octave_name=psi_1_int
export funcname=gsl_sf_psi_1_int
cat << \EOF > docstring.txt
These routines compute the Trigamma function \psi(n) for positive
integer n.
EOF
./replace_template.sh int_to_double.cc.template >> gsl_sf.cc
export octave_name=zeta_int
export funcname=gsl_sf_zeta_int
cat << \EOF > docstring.txt
These routines compute the Riemann zeta function \zeta(n) for
integer n, n \ne 1.
EOF
./replace_template.sh int_to_double.cc.template >> gsl_sf.cc
export octave_name=eta_int
export funcname=gsl_sf_eta_int
cat << \EOF > docstring.txt
These routines compute the eta function \eta(n) for integer n.
EOF
./replace_template.sh int_to_double.cc.template >> gsl_sf.cc
# (int, int, double) to double
export octave_name=legendre_Plm
export funcname=gsl_sf_legendre_Plm
cat << \EOF > docstring.txt
These routines compute the associated Legendre polynomial P_l^m(x)
for m >= 0, l >= m, |x| <= 1.
EOF
./replace_template.sh int_int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=legendre_sphPlm
export funcname=gsl_sf_legendre_sphPlm
cat << \EOF > docstring.txt
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).
EOF
./replace_template.sh int_int_double_to_double.cc.template >> gsl_sf.cc
export octave_name=hyperg_U
export funcname=gsl_sf_hyperg_U
cat << \EOF > docstring.txt
Secondary Confluent Hypergoemetric U function A&E 13.1.3
All inputs are double as is the output.
EOF
./replace_template.sh DDD_to_D.cc.template >> gsl_sf.cc
export octave_name=hyperg_1F1
export funcname=gsl_sf_hyperg_1F1
cat << \EOF > docstring.txt
Primary Confluent Hypergoemetric U function A&E 13.1.3
All inputs are double as is the output.
EOF
./replace_template.sh DDD_to_D.cc.template >> gsl_sf.cc