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.12
82 */
87 static CALLS __calls[__ncalls] = {
88 {"cfftb1", 0}, // subroutine
89 {"cfftb", 0}, // subroutine
90 {"cfftf1", 0}, // subroutine
91 {"cfftf", 0}, // subroutine
92 {"cffti1", 0}, // subroutine
93 {"cffti", 0}, // subroutine
94 {"cosqb1", 0}, // subroutine
95 {"cosqb", 0}, // subroutine
96 {"cosqf1", 0}, // subroutine
97 {"cosqf", 0}, // subroutine
98 {"cosqi", 0}, // subroutine
99 {"cost", 0}, // subroutine
100 {"costi", 0}, // subroutine
101 {"dcosqb", 0}, // subroutine
102 {"dcosqf", 0}, // subroutine
103 {"dcosqi", 0}, // subroutine
104 {"dcost", 0}, // subroutine
105 {"dcosti", 0}, // subroutine
106 {"dfftb", 0}, // subroutine
107 {"dfftf", 0}, // subroutine
108 {"dffti", 0}, // subroutine
109 {"dsinqb", 0}, // subroutine
110 {"dsinqf", 0}, // subroutine
111 {"dsinqi", 0}, // subroutine
112 {"dsint", 0}, // subroutine
113 {"dsinti", 0}, // subroutine
114 {"dzfftb", 0}, // subroutine
115 {"dzfftf", 0}, // subroutine
116 {"dzffti", 0}, // subroutine
117 {"ezfft1", 0}, // subroutine
118 {"ezfftb", 0}, // subroutine
119 {"ezfftf", 0}, // subroutine
120 {"ezffti", 0}, // subroutine
121 {"passb2", 0}, // subroutine
122 {"passb3", 0}, // subroutine
123 {"passb4", 0}, // subroutine
124 {"passb5", 0}, // subroutine
125 {"passb", 0}, // subroutine
126 {"passf2", 0}, // subroutine
127 {"passf3", 0}, // subroutine
128 {"passf4", 0}, // subroutine
129 {"passf5", 0}, // subroutine
130 {"passf", 0}, // subroutine
131 {"radb2", 0}, // subroutine
132 {"radb3", 0}, // subroutine
133 {"radb4", 0}, // subroutine
134 {"radb5", 0}, // subroutine
135 {"radbg", 0}, // subroutine
136 {"radf2", 0}, // subroutine
137 {"radf3", 0}, // subroutine
138 {"radf4", 0}, // subroutine
139 {"radf5", 0}, // subroutine
140 {"radfg", 0}, // subroutine
141 {"rfftb1", 0}, // subroutine
142 {"rfftb", 0}, // subroutine
143 {"rfftf1", 0}, // subroutine
144 {"rfftf", 0}, // subroutine
145 {"rffti1", 0}, // subroutine
146 {"rffti", 0}, // subroutine
147 {"sinqb", 0}, // subroutine
148 {"sinqf", 0}, // subroutine
149 {"sinqi", 0}, // subroutine
150 {"sint1", 0}, // subroutine
151 {"sint", 0}, // subroutine
152 {"sinti", 0}, // subroutine
153 {"zfftb", 0}, // subroutine
154 {"zfftf", 0}, // subroutine
155 {"zffti", 0}, // subroutine
156 {NULL, 0}
157 };
158
186 wsave_);
188 wsave_);
192 wsave_);
194 wsave_);
198 wa2_);
200 wa2_, real_8 _p_ wa3_);
202 wa2_, real_8 _p_ wa3_, real_8 _p_ wa4_);
204 real_8 _p_ c1_, real_8 _p_ c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_);
207 wa2_);
209 wa2_, real_8 _p_ wa3_);
211 wa2_, real_8 _p_ wa3_, real_8 _p_ wa4_);
213 real_8 _p_ c1_, real_8 _p_ c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_);
216 );
218 , real_8 _p_ wa3_);
220 , real_8 _p_ wa3_, real_8 _p_ wa4_);
222 real_8 _p_ c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_);
225 );
227 , real_8 _p_ wa3_);
229 , real_8 _p_ wa3_, real_8 _p_ wa4_);
231 real_8 _p_ c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_);
242 ;
248 int_4 _cfftb1 (int_4 _p_ n_, real_8 _p_ c_, real_8 _p_ ch_, real_8 _p_ wa_, int_4 _p_ ifac_)
249 { // ** body not listed **
348 }
349
350 int_4 _cfftb (int_4 _p_ n_, complex_8 _p_ c_, real_4 _p_ wsave_)
351 { // ** body not listed **
362 }
363
364 int_4 _cfftf1 (int_4 _p_ n_, real_8 _p_ c_, real_8 _p_ ch_, real_8 _p_ wa_, int_4 _p_ ifac_)
365 { // ** body not listed **
464 }
465
466 int_4 _cfftf (int_4 _p_ n_, complex_8 _p_ c_, real_4 _p_ wsave_)
467 { // ** body not listed **
478 }
479
480 int_4 _cffti1 (int_4 _p_ n_, real_8 _p_ wa_, int_4 _p_ ifac_)
481 { // ** body not listed **
597 }
598
599 int_4 _cffti (int_4 _p_ n_, real_4 _p_ wsave_)
600 { // ** body not listed **
611 }
612
613 int_4 _cosqb1 (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ w_, real_8 _p_ xh_)
614 { // ** body not listed **
646 }
647
648 int_4 _cosqb (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ wsave_)
649 { // ** body not listed **
674 }
675
676 int_4 _cosqf1 (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ w_, real_8 _p_ xh_)
677 { // ** body not listed **
707 }
708
709 int_4 _cosqf (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ wsave_)
710 { // ** body not listed **
733 }
734
735 int_4 _cosqi (int_4 _p_ n_, real_4 _p_ wsave_)
736 { // ** body not listed **
749 }
750
751 int_4 _cost (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ wsave_)
752 { // ** body not listed **
814 }
815
816 int_4 _costi (int_4 _p_ n_, real_4 _p_ wsave_)
817 { // ** body not listed **
839 }
840
841 int_4 _dcosqb (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ wsave_)
842 { // ** body not listed **
877 }
878
879 int_4 _dcosqf (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ wsave_)
880 { // ** body not listed **
913 }
914
915 int_4 _dcosqi (int_4 _p_ n_, real_8 _p_ wsave_)
916 { // ** body not listed **
940 }
941
942 int_4 _dcost (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ wsave_)
943 { // ** body not listed **
1005 }
1006
1007 int_4 _dcosti (int_4 _p_ n_, real_8 _p_ wsave_)
1008 { // ** body not listed **
1041 }
1042
1043 int_4 _dfftb (int_4 _p_ n_, real_8 _p_ r_, real_8 _p_ wsave_)
1044 { // ** body not listed **
1052 }
1053
1054 int_4 _dfftf (int_4 _p_ n_, real_8 _p_ r_, real_8 _p_ wsave_)
1055 { // ** body not listed **
1063 }
1064
1065 int_4 _dffti (int_4 _p_ n_, real_8 _p_ wsave_)
1066 { // ** body not listed **
1074 }
1075
1076 int_4 _dsinqb (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ wsave_)
1077 { // ** body not listed **
1100 }
1101
1102 int_4 _dsinqf (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ wsave_)
1103 { // ** body not listed **
1123 }
1124
1125 int_4 _dsinqi (int_4 _p_ n_, real_8 _p_ wsave_)
1126 { // ** body not listed **
1130 }
1131
1132 int_4 _dsint (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ wsave_)
1133 { // ** body not listed **
1142 }
1143
1144 int_4 _dsinti (int_4 _p_ n_, real_8 _p_ wsave_)
1145 { // ** body not listed **
1173 }
1174
1175 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_)
1176 { // ** body not listed **
1208 }
1209
1210 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_)
1211 { // ** body not listed **
1252 }
1253
1254 int_4 _dzffti (int_4 _p_ n_, real_8 _p_ wsave_)
1255 { // ** body not listed **
1263 }
1264
1265 int_4 _ezfft1 (int_4 _p_ n_, real_8 _p_ wa_, int_4 _p_ ifac_)
1266 { // ** body not listed **
1395 }
1396
1397 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_)
1398 { // ** body not listed **
1430 }
1431
1432 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_)
1433 { // ** body not listed **
1472 }
1473
1474 int_4 _ezffti (int_4 _p_ n_, real_4 _p_ wsave_)
1475 { // ** body not listed **
1483 }
1484
1485 int_4 _passb2 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_)
1486 { // ** body not listed **
1520 }
1521
1522 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_)
1523 { // ** body not listed **
1589 }
1590
1591 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
1592 _p_ wa3_)
1593 { // ** body not listed **
1652 }
1653
1654 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
1655 _p_ wa3_, real_8 _p_ wa4_)
1656 { // ** body not listed **
1767 }
1768
1769 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_
1770 c1_, real_8 _p_ c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_)
1771 { // ** body not listed **
1912 }
1913
1914 int_4 _passf2 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_)
1915 { // ** body not listed **
1949 }
1950
1951 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_)
1952 { // ** body not listed **
2018 }
2019
2020 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
2021 _p_ wa3_)
2022 { // ** body not listed **
2081 }
2082
2083 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
2084 _p_ wa3_, real_8 _p_ wa4_)
2085 { // ** body not listed **
2196 }
2197
2198 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_
2199 c1_, real_8 _p_ c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_)
2200 { // ** body not listed **
2341 }
2342
2343 int_4 _radb2 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_)
2344 { // ** body not listed **
2392 }
2393 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_)
2394 { // ** body not listed **
2455 }
2456
2457 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
2458 _p_ wa3_)
2459 { // ** body not listed **
2546 }
2547
2548 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
2549 _p_ wa3_, real_8 _p_ wa4_)
2550 { // ** body not listed **
2650 }
2651
2652 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_
2653 c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_)
2654 { // ** body not listed **
2873 }
2874
2875 int_4 _radf2 (int_4 _p_ ido_, int_4 _p_ l1_, real_8 _p_ cc_, real_8 _p_ ch_, real_8 _p_ wa1_)
2876 { // ** body not listed **
2924 }
2925 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_)
2926 { // ** body not listed **
2987 }
2988
2989 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
2990 _p_ wa3_)
2991 { // ** body not listed **
3079 }
3080
3081 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
3082 _p_ wa3_, real_8 _p_ wa4_)
3083 { // ** body not listed **
3183 }
3184
3185 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_
3186 c2_, real_8 _p_ ch_, real_8 _p_ ch2_, real_8 _p_ wa_)
3187 { // ** body not listed **
3409 }
3410
3411 int_4 _rfftb1 (int_4 _p_ n_, real_8 _p_ c_, real_8 _p_ ch_, real_8 _p_ wa_, int_4 _p_ ifac_)
3412 { // ** body not listed **
3509 }
3510
3511 int_4 _rfftb (int_4 _p_ n_, real_4 _p_ r_, real_4 _p_ wsave_)
3512 { // ** body not listed **
3520 }
3521
3522 int_4 _rfftf1 (int_4 _p_ n_, real_8 _p_ c_, real_8 _p_ ch_, real_8 _p_ wa_, int_4 _p_ ifac_)
3523 { // ** body not listed **
3615 }
3616
3617 int_4 _rfftf (int_4 _p_ n_, real_4 _p_ r_, real_4 _p_ wsave_)
3618 { // ** body not listed **
3626 }
3627
3628 int_4 _rffti1 (int_4 _p_ n_, real_8 _p_ wa_, int_4 _p_ ifac_)
3629 { // ** body not listed **
3742 }
3743
3744 int_4 _rffti (int_4 _p_ n_, real_4 _p_ wsave_)
3745 { // ** body not listed **
3753 }
3754
3755 int_4 _sinqb (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ wsave_)
3756 { // ** body not listed **
3779 }
3780
3781 int_4 _sinqf (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ wsave_)
3782 { // ** body not listed **
3802 }
3803
3804 int_4 _sinqi (int_4 _p_ n_, real_4 _p_ wsave_)
3805 { // ** body not listed **
3809 }
3810
3811 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_)
3812 { // ** body not listed **
3879 }
3880
3881 int_4 _sint (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ wsave_)
3882 { // ** body not listed **
3934 }
3935
3936 int_4 _sinti (int_4 _p_ n_, real_4 _p_ wsave_)
3937 { // ** body not listed **
3958 }
3959
3960 int_4 _zfftb (int_4 _p_ n_, real_8 _p_ c_, real_8 _p_ wsave_)
3961 { // ** body not listed **
3972 }
3973
3974 int_4 _zfftf (int_4 _p_ n_, real_8 _p_ c_, real_8 _p_ wsave_)
3975 { // ** body not listed **
3986 }
3987
3988 int_4 _zffti (int_4 _p_ n_, real_8 _p_ wsave_)
3989 { // ** body not listed **
4000 }
4001
© 2002-2025 J.M. van der Veer (jmvdveer@xs4all.nl)
|