File: fintg.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 (54 lines) | stat: -rw-r--r-- 1,171 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
      double precision function fintg(x)
c!
c  CALLING SEQUENCE: subroutine XXXXXX(x,f)
c!
      include '../stack.h'

C      implicit undefined (a-z)
      double precision x,pi,y
c
      integer it1
c
      character*6    name,nam1
      common /cintg/ name
      integer         iero
      common /ierode/ iero
c
      fintg=0.0d0
      iero=0
      call majmin(6,name,nam1)
c
c              EXAMPLE of FORTRAN CALL (nam1 is the chain
c                                       sent by intg)
c              SEE scilab/tests/intg.tst
c+
      if(nam1.eq.'toto') then
       pi=3.1415926520d+0
       fintg=x*sin(30.0d+0*x)/sqrt(1.0d+0-(x/(2.0d+0*pi))**2)
       return
      endif
c     if(nam1.eq.myfunc') then
c     fintg=myfunc(x)
c     endif
c+
c     dynamic link
      call tlink(name,0,it1)
      if(it1.le.0) goto 2000
      call dyncall(it1-1,x,y)
      fintg=y
cc fin
      return
c
 2000 iero=1
      buf=name
      call error(50)
      return
      end

c      subroutine foo(x,tt)
c test example (see SCIDIR/tests/intg.tst)
c      double precision x,pi,tt
c      pi=3.1415926524897932
c      tt=x*sin(30*x)/sqrt(1.0d0-((x/(2*pi))**2))
c      return
c      end