PLaSK library
Loading...
Searching...
No Matches
factor.c
Go to the documentation of this file.
1
/* factor.f -- translated by f2c (version 20100827).
2
You must link the resulting object file with libf2c:
3
on Microsoft Windows system, link with libf2c.lib;
4
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
5
or, if you install libf2c.a in a standard place, with -lf2c -lm
6
-- in that order, at the end of the command line, as in
7
cc *.o -lf2c -lm
8
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
9
10
http://www.netlib.org/f2c/libf2c.zip
11
*/
12
13
#include "
f2c.h
"
14
15
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
16
/* * * */
17
/* * copyright (c) 2011 by UCAR * */
18
/* * * */
19
/* * University Corporation for Atmospheric Research * */
20
/* * * */
21
/* * all rights reserved * */
22
/* * * */
23
/* * FFTPACK version 5.1 * */
24
/* * * */
25
/* * A Fortran Package of Fast Fourier * */
26
/* * * */
27
/* * Subroutines and Example Programs * */
28
/* * * */
29
/* * by * */
30
/* * * */
31
/* * Paul Swarztrauber and Dick Valent * */
32
/* * * */
33
/* * of * */
34
/* * * */
35
/* * the National Center for Atmospheric Research * */
36
/* * * */
37
/* * Boulder, Colorado (80307) U.S.A. * */
38
/* * * */
39
/* * which is sponsored by * */
40
/* * * */
41
/* * the National Science Foundation * */
42
/* * * */
43
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
44
45
/* Subroutine */
int
factor_
(
integer
*
n
,
integer
*nf,
doublereal
*fac)
46
{
47
/* Initialized data */
48
49
static
integer
ntryh[4] = { 4,2,3,5 };
50
51
integer
j, nl, nq, nr, ntry;
52
53
/* Parameter adjustments */
54
--fac;
55
56
/* Function Body */
57
58
nl = *
n
;
59
*nf = 0;
60
j = 0;
61
L101:
62
++j;
63
if
(j - 4 <= 0) {
64
goto
L102;
65
}
else
{
66
goto
L103;
67
}
68
L102:
69
ntry = ntryh[j - 1];
70
goto
L104;
71
L103:
72
ntry += 2;
73
L104:
74
nq = nl / ntry;
75
nr = nl - ntry * nq;
76
if
(nr != 0) {
77
goto
L101;
78
}
else
{
79
goto
L105;
80
}
81
L105:
82
++(*nf);
83
fac[*nf] = (
doublereal
) ntry;
84
nl = nq;
85
if
(nl != 1) {
86
goto
L104;
87
}
88
return
0;
89
}
/* factor_ */
90
extlib
fftpacx
factor.c
Generated by
1.9.8