File: wprxc.f

package info (click to toggle)
scilab 2.2-4
  • links: PTS
  • area: non-free
  • in suites: hamm
  • size: 31,472 kB
  • ctags: 21,963
  • sloc: fortran: 110,983; ansic: 89,717; makefile: 3,016; sh: 1,892; csh: 150; cpp: 101
file content (37 lines) | stat: -rw-r--r-- 1,017 bytes parent folder | download
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
C/MEMBR ADD NAME=WPRXC,SSI=0
      subroutine wprxc(n,rootr,rooti,coeffr,coeffi)
c!but
c     wprxc calcule les coefficients d'un polynome defini par ses
c     racines (complexes) et dont le coefficient de degre maximum est 1
c
c!liste d'appel
c      subroutine wprxc(n,rootr,rooti,coeffr,coeffi)
c     double precision rootr(n),rooti(n),coeffr(n+1),coeffi(n+1)
c     integer n
c
c     n     : degre du polynome
c     root : tableau contenant les racines
c     coeff : tableau contenant les coefficients du polynome, ranges
c             par odre croissant
c!sous programmes appeles
c     dset waxpy (blas)
c!origine
c     serge Steer INRIA
c!
      double precision rootr(n),rooti(n),coeffr(*),coeffi(*)
      integer n
c
      integer j,nj
c
      call dset (n,0.0d+0,coeffr,1)
      call dset (n+1,0.0d+0,coeffi,1)
      coeffr(n+1)=1.0d+0
c
      do 10 j=1,n
      nj=n+1-j
      call waxpy(j,-rootr(j),-rooti(j),coeffr(nj+1),coeffi(nj+1),1,
     & coeffr(nj),coeffi(nj),1)
   10 continue
c
      return
      end