mathlib-fftpack4.c
1 //! @file mathlib-fftpack4.c
2 //
3 //! @section copyright
4 //
5 // This file is part of VIF - vintage fortran compiler.
6 // Copyright 2020-2025 J. Marcel van der Veer <algol68g@xs4all.nl>.
7 //
8 //! @section license
9 //
10 // This program is free software; you can redistribute it and/or modify it
11 // under the terms of the gnu general public license as published by the
12 // free software foundation; either version 3 of the license, or
13 // (at your option) any later version.
14 //
15 // This program is distributed in the hope that it will be useful, but
16 // without any warranty; without even the implied warranty of merchantability
17 // or fitness for a particular purpose. See the GNU general public license for
18 // more details. you should have received a copy of the GNU general public
19 // license along with this program. If not, see <http://www.gnu.org/licenses/>.
20 //
21 //! @Synopsis
22 //
23 //! 68 subprograms from FFTPACK4
24
25 // Compiled from Fortran source code by VIF.
26 // Selected subprograms are:
27 //
28 // CFFTB COSQB1 DCOSQF DSINQB DZFFTI PASSB3 PASSF5 RADF3 RFFTF1 SINT
29 // CFFTB1 COSQF DCOSQI DSINQF EZFFT1 PASSB4 RADB2 RADF4 RFFTI SINT1
30 // CFFTF COSQF1 DCOST DSINQI EZFFTB PASSB5 RADB3 RADF5 RFFTI1 SINTI
31 // CFFTF1 COSQI DCOSTI DSINT EZFFTF PASSF RADB4 RADFG SINQB ZFFTB
32 // CFFTI COST DFFTB DSINTI EZFFTI PASSF2 RADB5 RFFTB SINQF ZFFTF
33 // CFFTI1 COSTI DFFTF DZFFTB PASSB PASSF3 RADBG RFFTB1 SINQI ZFFTI
34 // COSQB DCOSQB DFFTI DZFFTF PASSB2 PASSF4 RADF2 RFFTF
35
36 // Source: netlib.org/fftpack
37 //
38 // DFFTPACK is a Double precision clone by Hugh C. Pumphrey of
39 // FFTPACK version 4 april 1985.
40 //
41 // The original FFTPACK was public domain, so dfftpack is public domain
42 // too. It is released in the hope it will be useful to someone. There is
43 // no warranty of any sort covering this software.
44
45 // The license for FFTPACK4 Fortran source code is:
46 //
47 // The SLATEC Common Mathematical Library was developed at
48 // US government research laboratories and is in the public domain.
49 //
50 // Repository: http://www.netlib.org/slatec/
51 //
52 // The SLATEC common mathematical library is issued by the following
53 //
54 // Air Force Weapons Laboratory, Albuquerque
55 // Lawrence Livermore National Laboratory, Livermore
56 // Los Alamos National Laboratory, Los Alamos
57 // National Institute of Standards and Technology, Washington
58 // National Energy Research Supercomputer Center, Livermore
59 // Oak Ridge National Laboratory, Oak Ridge
60 // Sandia National Laboratories, Albuquerque
61 // Sandia National Laboratories, Livermore
62 //
63 // All questions concerning the distribution of the library should be
64 // directed to the NATIONAL ENERGY SOFTWARE CENTER, 9700 Cass Ave.,
65 // Argonne, Illinois 60439, and not to the authors of the subprograms.
66 //
67 // * * * * * Notice * * * * *
68 //
69 // This material was prepared as an account of work sponsored by the
70 // United States Government. Neither the United States, nor the
71 // Department of Energy, nor the Department of Defense, nor any of
72 // their employees, nor any of their contractors, subcontractors, or
73 // their employees, makes any warranty, expressed or implied, or
74 // assumes any legal liability or responsibility for the accuracy,
75 // completeness, or usefulness of any information, apparatus, product,
76 // or process disclosed, or represents that its use would not infringe
77 // upon privately owned rights.
78
79 /*
80 Generated by VIF - experimental VIntage Fortran compiler.
81 VIF release 1.2.17
82 */
83 #if defined (__GNUC__)
84 #pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
85 #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
86 #if (__GNUC__ >= 14)
87 #pragma GCC diagnostic ignored "-Wdeclaration-missing-parameter-type"
88 #pragma GCC diagnostic ignored "-Wimplicit-int"
89 #pragma GCC diagnostic ignored "-Wint-conversion"
90 #pragma GCC diagnostic ignored "-Wreturn-mismatch"
91 #endif
92 #else
93 #error VIF requires GCC
94 #endif
99 static CALLS __calls[__ncalls] = {
100 {"cfftb1", 0}, // subroutine
101 {"cfftb", 0}, // subroutine
102 {"cfftf1", 0}, // subroutine
103 {"cfftf", 0}, // subroutine
104 {"cffti1", 0}, // subroutine
105 {"cffti", 0}, // subroutine
106 {"cosqb1", 0}, // subroutine
107 {"cosqb", 0}, // subroutine
108 {"cosqf1", 0}, // subroutine
109 {"cosqf", 0}, // subroutine
110 {"cosqi", 0}, // subroutine
111 {"cost", 0}, // subroutine
112 {"costi", 0}, // subroutine
113 {"dcosqb", 0}, // subroutine
114 {"dcosqf", 0}, // subroutine
115 {"dcosqi", 0}, // subroutine
116 {"dcost", 0}, // subroutine
117 {"dcosti", 0}, // subroutine
118 {"dfftb", 0}, // subroutine
119 {"dfftf", 0}, // subroutine
120 {"dffti", 0}, // subroutine
121 {"dsinqb", 0}, // subroutine
122 {"dsinqf", 0}, // subroutine
123 {"dsinqi", 0}, // subroutine
124 {"dsint", 0}, // subroutine
125 {"dsinti", 0}, // subroutine
126 {"dzfftb", 0}, // subroutine
127 {"dzfftf", 0}, // subroutine
128 {"dzffti", 0}, // subroutine
129 {"ezfft1", 0}, // subroutine
130 {"ezfftb", 0}, // subroutine
131 {"ezfftf", 0}, // subroutine
132 {"ezffti", 0}, // subroutine
133 {"passb2", 0}, // subroutine
134 {"passb3", 0}, // subroutine
135 {"passb4", 0}, // subroutine
136 {"passb5", 0}, // subroutine
137 {"passb", 0}, // subroutine
138 {"passf2", 0}, // subroutine
139 {"passf3", 0}, // subroutine
140 {"passf4", 0}, // subroutine
141 {"passf5", 0}, // subroutine
142 {"passf", 0}, // subroutine
143 {"radb2", 0}, // subroutine
144 {"radb3", 0}, // subroutine
145 {"radb4", 0}, // subroutine
146 {"radb5", 0}, // subroutine
147 {"radbg", 0}, // subroutine
148 {"radf2", 0}, // subroutine
149 {"radf3", 0}, // subroutine
150 {"radf4", 0}, // subroutine
151 {"radf5", 0}, // subroutine
152 {"radfg", 0}, // subroutine
153 {"rfftb1", 0}, // subroutine
154 {"rfftb", 0}, // subroutine
155 {"rfftf1", 0}, // subroutine
156 {"rfftf", 0}, // subroutine
157 {"rffti1", 0}, // subroutine
158 {"rffti", 0}, // subroutine
159 {"sinqb", 0}, // subroutine
160 {"sinqf", 0}, // subroutine
161 {"sinqi", 0}, // subroutine
162 {"sint1", 0}, // subroutine
163 {"sint", 0}, // subroutine
164 {"sinti", 0}, // subroutine
165 {"zfftb", 0}, // subroutine
166 {"zfftf", 0}, // subroutine
167 {"zffti", 0}, // subroutine
168 {NULL, 0}
169 };
170
198 wsave_);
200 wsave_);
204 wsave_);
206 wsave_);
210 wa2_);
212 wa2_, real_8 _p_ wa3_);
214 wa2_, real_8 _p_ wa3_, real_8 _p_ wa4_);
216 real_8 _p_ c1_, real_8 _p_ c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_);
219 wa2_);
221 wa2_, real_8 _p_ wa3_);
223 wa2_, real_8 _p_ wa3_, real_8 _p_ wa4_);
225 real_8 _p_ c1_, real_8 _p_ c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_);
228 );
230 , real_8 _p_ wa3_);
232 , real_8 _p_ wa3_, real_8 _p_ wa4_);
234 real_8 _p_ c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_);
237 );
239 , real_8 _p_ wa3_);
241 , real_8 _p_ wa3_, real_8 _p_ wa4_);
243 real_8 _p_ c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_);
254 ;
260 int_4 _cfftb1 (int_4 _p_ n_, real_8 _p_ c_, real_8 _p_ ch_, real_8 _p_ wa_, int_4 _p_ ifac_)
261 { // ** body not listed **
360 }
361
362 int_4 _cfftb (int_4 _p_ n_, complex_8 _p_ c_, real_4 _p_ wsave_)
363 { // ** body not listed **
374 }
375
376 int_4 _cfftf1 (int_4 _p_ n_, real_8 _p_ c_, real_8 _p_ ch_, real_8 _p_ wa_, int_4 _p_ ifac_)
377 { // ** body not listed **
476 }
477
478 int_4 _cfftf (int_4 _p_ n_, complex_8 _p_ c_, real_4 _p_ wsave_)
479 { // ** body not listed **
490 }
491
492 int_4 _cffti1 (int_4 _p_ n_, real_8 _p_ wa_, int_4 _p_ ifac_)
493 { // ** body not listed **
609 }
610
611 int_4 _cffti (int_4 _p_ n_, real_4 _p_ wsave_)
612 { // ** body not listed **
623 }
624
625 int_4 _cosqb1 (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ w_, real_8 _p_ xh_)
626 { // ** body not listed **
658 }
659
660 int_4 _cosqb (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ wsave_)
661 { // ** body not listed **
686 }
687
688 int_4 _cosqf1 (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ w_, real_8 _p_ xh_)
689 { // ** body not listed **
719 }
720
721 int_4 _cosqf (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ wsave_)
722 { // ** body not listed **
745 }
746
747 int_4 _cosqi (int_4 _p_ n_, real_4 _p_ wsave_)
748 { // ** body not listed **
761 }
762
763 int_4 _cost (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ wsave_)
764 { // ** body not listed **
826 }
827
828 int_4 _costi (int_4 _p_ n_, real_4 _p_ wsave_)
829 { // ** body not listed **
851 }
852
853 int_4 _dcosqb (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ wsave_)
854 { // ** body not listed **
889 }
890
891 int_4 _dcosqf (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ wsave_)
892 { // ** body not listed **
925 }
926
927 int_4 _dcosqi (int_4 _p_ n_, real_8 _p_ wsave_)
928 { // ** body not listed **
952 }
953
954 int_4 _dcost (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ wsave_)
955 { // ** body not listed **
1017 }
1018
1019 int_4 _dcosti (int_4 _p_ n_, real_8 _p_ wsave_)
1020 { // ** body not listed **
1053 }
1054
1055 int_4 _dfftb (int_4 _p_ n_, real_8 _p_ r_, real_8 _p_ wsave_)
1056 { // ** body not listed **
1064 }
1065
1066 int_4 _dfftf (int_4 _p_ n_, real_8 _p_ r_, real_8 _p_ wsave_)
1067 { // ** body not listed **
1075 }
1076
1077 int_4 _dffti (int_4 _p_ n_, real_8 _p_ wsave_)
1078 { // ** body not listed **
1086 }
1087
1088 int_4 _dsinqb (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ wsave_)
1089 { // ** body not listed **
1112 }
1113
1114 int_4 _dsinqf (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ wsave_)
1115 { // ** body not listed **
1135 }
1136
1137 int_4 _dsinqi (int_4 _p_ n_, real_8 _p_ wsave_)
1138 { // ** body not listed **
1142 }
1143
1144 int_4 _dsint (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ wsave_)
1145 { // ** body not listed **
1154 }
1155
1156 int_4 _dsinti (int_4 _p_ n_, real_8 _p_ wsave_)
1157 { // ** body not listed **
1185 }
1186
1187 int_4 _dzfftb (int_4 _p_ n_, real_8 _p_ r_, real_8 _p_ azero_, real_8 _p_ a_, real_8 _p_ b_, real_8 _p_ wsave_)
1188 { // ** body not listed **
1220 }
1221
1222 int_4 _dzfftf (int_4 _p_ n_, real_8 _p_ r_, real_8 _p_ azero_, real_8 _p_ a_, real_8 _p_ b_, real_8 _p_ wsave_)
1223 { // ** body not listed **
1264 }
1265
1266 int_4 _dzffti (int_4 _p_ n_, real_8 _p_ wsave_)
1267 { // ** body not listed **
1275 }
1276
1277 int_4 _ezfft1 (int_4 _p_ n_, real_8 _p_ wa_, int_4 _p_ ifac_)
1278 { // ** body not listed **
1407 }
1408
1409 int_4 _ezfftb (int_4 _p_ n_, real_4 _p_ r_, real_4 _p_ azero_, real_4 _p_ a_, real_4 _p_ b_, real_4 _p_ wsave_)
1410 { // ** body not listed **
1442 }
1443
1444 int_4 _ezfftf (int_4 _p_ n_, real_4 _p_ r_, real_4 _p_ azero_, real_4 _p_ a_, real_4 _p_ b_, real_4 _p_ wsave_)
1445 { // ** body not listed **
1484 }
1485
1486 int_4 _ezffti (int_4 _p_ n_, real_4 _p_ wsave_)
1487 { // ** body not listed **
1495 }
1496
1497 int_4 _passb2 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_)
1498 { // ** body not listed **
1532 }
1533
1534 int_4 _passb3 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_, real_8 _p_ wa2_)
1535 { // ** body not listed **
1601 }
1602
1603 int_4 _passb4 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_, real_8 _p_ wa2_, real_8
1604 _p_ wa3_)
1605 { // ** body not listed **
1664 }
1665
1666 int_4 _passb5 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_, real_8 _p_ wa2_, real_8
1667 _p_ wa3_, real_8 _p_ wa4_)
1668 { // ** body not listed **
1779 }
1780
1781 int_4 _passb (int_4 _p_ nac_, int_4 _p_ ido_, int_4 _p_ ip_, int_4 _p_ l1_, int_4 _p_ idl1_, real_8 _p_ cc_, real_8 _p_
1782 c1_, real_8 _p_ c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_)
1783 { // ** body not listed **
1924 }
1925
1926 int_4 _passf2 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_)
1927 { // ** body not listed **
1961 }
1962
1963 int_4 _passf3 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_, real_8 _p_ wa2_)
1964 { // ** body not listed **
2030 }
2031
2032 int_4 _passf4 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_, real_8 _p_ wa2_, real_8
2033 _p_ wa3_)
2034 { // ** body not listed **
2093 }
2094
2095 int_4 _passf5 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_, real_8 _p_ wa2_, real_8
2096 _p_ wa3_, real_8 _p_ wa4_)
2097 { // ** body not listed **
2208 }
2209
2210 int_4 _passf (int_4 _p_ nac_, int_4 _p_ ido_, int_4 _p_ ip_, int_4 _p_ l1_, int_4 _p_ idl1_, real_8 _p_ cc_, real_8 _p_
2211 c1_, real_8 _p_ c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_)
2212 { // ** body not listed **
2353 }
2354
2355 int_4 _radb2 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_)
2356 { // ** body not listed **
2404 }
2405 int_4 _radb3 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_, real_8 _p_ wa2_)
2406 { // ** body not listed **
2467 }
2468
2469 int_4 _radb4 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_, real_8 _p_ wa2_, real_8
2470 _p_ wa3_)
2471 { // ** body not listed **
2558 }
2559
2560 int_4 _radb5 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_, real_8 _p_ wa2_, real_8
2561 _p_ wa3_, real_8 _p_ wa4_)
2562 { // ** body not listed **
2662 }
2663
2664 int_4 _radbg (int_4 _p_ ido_, int_4 _p_ ip_, int_4 _p_ l1_, int_4 _p_ idl1_, real_8 _p_ cc_, real_8 _p_ c1_, real_8 _p_
2665 c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_)
2666 { // ** body not listed **
2885 }
2886
2887 int_4 _radf2 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_)
2888 { // ** body not listed **
2936 }
2937 int_4 _radf3 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_, real_8 _p_ wa2_)
2938 { // ** body not listed **
2999 }
3000
3001 int_4 _radf4 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_, real_8 _p_ wa2_, real_8
3002 _p_ wa3_)
3003 { // ** body not listed **
3091 }
3092
3093 int_4 _radf5 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_, real_8 _p_ wa2_, real_8
3094 _p_ wa3_, real_8 _p_ wa4_)
3095 { // ** body not listed **
3195 }
3196
3197 int_4 _radfg (int_4 _p_ ido_, int_4 _p_ ip_, int_4 _p_ l1_, int_4 _p_ idl1_, real_8 _p_ cc_, real_8 _p_ c1_, real_8 _p_
3198 c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_)
3199 { // ** body not listed **
3421 }
3422
3423 int_4 _rfftb1 (int_4 _p_ n_, real_8 _p_ c_, real_8 _p_ ch_, real_8 _p_ wa_, int_4 _p_ ifac_)
3424 { // ** body not listed **
3521 }
3522
3523 int_4 _rfftb (int_4 _p_ n_, real_4 _p_ r_, real_4 _p_ wsave_)
3524 { // ** body not listed **
3532 }
3533
3534 int_4 _rfftf1 (int_4 _p_ n_, real_8 _p_ c_, real_8 _p_ ch_, real_8 _p_ wa_, int_4 _p_ ifac_)
3535 { // ** body not listed **
3627 }
3628
3629 int_4 _rfftf (int_4 _p_ n_, real_4 _p_ r_, real_4 _p_ wsave_)
3630 { // ** body not listed **
3638 }
3639
3640 int_4 _rffti1 (int_4 _p_ n_, real_8 _p_ wa_, int_4 _p_ ifac_)
3641 { // ** body not listed **
3754 }
3755
3756 int_4 _rffti (int_4 _p_ n_, real_4 _p_ wsave_)
3757 { // ** body not listed **
3765 }
3766
3767 int_4 _sinqb (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ wsave_)
3768 { // ** body not listed **
3791 }
3792
3793 int_4 _sinqf (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ wsave_)
3794 { // ** body not listed **
3814 }
3815
3816 int_4 _sinqi (int_4 _p_ n_, real_4 _p_ wsave_)
3817 { // ** body not listed **
3821 }
3822
3823 int_4 _sint1 (int_4 _p_ n_, real_8 _p_ war_, real_8 _p_ was_, real_8 _p_ xh_, real_8 _p_ x_, int_4 _p_ ifac_)
3824 { // ** body not listed **
3891 }
3892
3893 int_4 _sint (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ wsave_)
3894 { // ** body not listed **
3946 }
3947
3948 int_4 _sinti (int_4 _p_ n_, real_4 _p_ wsave_)
3949 { // ** body not listed **
3970 }
3971
3972 int_4 _zfftb (int_4 _p_ n_, real_8 _p_ c_, real_8 _p_ wsave_)
3973 { // ** body not listed **
3984 }
3985
3986 int_4 _zfftf (int_4 _p_ n_, real_8 _p_ c_, real_8 _p_ wsave_)
3987 { // ** body not listed **
3998 }
3999
4000 int_4 _zffti (int_4 _p_ n_, real_8 _p_ wsave_)
4001 { // ** body not listed **
4012 }
4013
© 2002-2025 J.M. van der Veer (jmvdveer@xs4all.nl)
|