~ubuntu-branches/ubuntu/karmic/maxima/karmic

« back to all changes in this revision

Viewing changes to share/contrib/gentran/man/tmp2.ms

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-11-13 18:39:14 UTC
  • mto: (2.1.2 hoary) (3.2.1 sid) (1.1.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20041113183914-ttig0evwuatnqosl
Tags: upstream-5.9.1
ImportĀ upstreamĀ versionĀ 5.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.nr LL 6.5i
 
2
.nr FL 6.0i
 
3
.ND
 
4
.DS L
 
5
|             FORTRAN CODE             |        RATFOR CODE
 
6
+--------------------------------------+----------------------------
 
7
|                                      |
 
8
|                                      |
 
9
|                                      |
 
10
|      p=a*x**2+b*x+c                  |p=a*x**2+b*x+c
 
11
|                                      |
 
12
|                                      |
 
13
|                                      |
 
14
|                                      |
 
15
|                                      |
 
16
|                                      |
 
17
|      m(1,1)=u                        |m(1,1)=u
 
18
|      m(1,2)=v                        |m(1,2)=v
 
19
|      m(2,1)=w                        |m(2,1)=w
 
20
|      m(2,2)=x                        |m(2,2)=x
 
21
|                                      |
 
22
|                                      |
 
23
|                                      |
 
24
|                                      |
 
25
|                                      |
 
26
|      do 25001 i=1,9,2                |do i=1,9,2
 
27
|         p=p+a(i)                     |    p=p+a(i)
 
28
|25001 continue                        |
 
29
|                                      |
 
30
|                                      |
 
31
|      n=2.0                           |for (n=2.0;!n>500.0;n=n*2.0)
 
32
|25002 if (n.gt.500.0) goto 25003      |    s=s+n
 
33
|         s=s+n                        |
 
34
|         n=n*2.0                      |
 
35
|         goto 25002                   |
 
36
|25003 continue                        |
 
37
|                                      |
 
38
|25004 if (.not.f(x).ge.0.0) goto 25005|while (f(x)>=0.0)
 
39
|         x=x+0.25                     |    x=x+0.25
 
40
|         goto 25004                   |
 
41
|25005 continue                        |
 
42
|                                      |
 
43
|25006 if (f(x).ge.0.0) goto 25007     |while (!f(x)>=0.0)
 
44
|         x=x+0.25                     |    x=x+0.25
 
45
|         goto 25006                   |
 
46
|25007 continue                        |
 
47
|                                      |
 
48
|                                      |
 
49
|                                      |
 
50
|                                      |
 
51
|                                      |
 
52
|      if (.not.tot.ge.0.0) goto 25008 |if (tot>=0.0)
 
53
|          flag=.true.                 |    flag=.true.
 
54
|25008 continue                        |
 
55
|                                      |
 
56
|                                      |
 
57
|      if (.not.tot.ge.0.0) goto 25009 |if (tot>=0.0)
 
58
|         flag=.true.                  |    flag=.true.
 
59
|         goto 25010                   |else
 
60
|25009 continue                        |    flag=.false.
 
61
|         flag=.false.                 |
 
62
|25010 continue                        |
 
63
|                                      |
 
64
|                                      |
 
65
|                                      |
 
66
|                                      |
 
67
|                                      |
 
68
|      goto 25011                      |goto 25011
 
69
|                                      |
 
70
|      call calcz(a,b,c,z)             |call calcz(a,b,c,z)
 
71
|                                      |
 
72
|      \fIfunctionname\fR=x**2               |return(x**2)
 
73
|      return                          |
 
74
|                                      |
 
75
|                                      |
 
76
|                                      |
 
77
|                                      |
 
78
|      u=x**2                          |u=x**2
 
79
|      v=y**2                          |v=y**2
 
80
|                                      |
 
81
|                                      |
 
82
|      u=x**2                          |{
 
83
|      v=y**2                          |    u=x**2
 
84
|                                      |    v=y**2
 
85
|                                      |}
 
86
|                                      |
 
87
|                                      |
 
88
|                                      |
 
89
|      write(*,*) "Enter x"            |write(*,*) "Enter x"
 
90
|      read(*,*) x                     |read(*,*) x
 
91
|                                      |
 
92
|      write(*,*) "x = ", x            |write(*,*) "x = ", x
 
93
|                                      |
 
94
|                                      |
 
95
|                                      |
 
96
|      function f(a,b,c,x)             |function f(a,b,c,x)
 
97
|      z=a*b*c+x                       |z=a*b*c+x
 
98
|      f=z                             |return(z)
 
99
|      return                          |end
 
100
|      end                             |
 
101
|                                      |
 
102
|                                      |
 
103
|      subroutine f(a,b,c,x)           |subroutine f(a,b,c,x)
 
104
|      z=a*b*c+x                       |z=a*b*c+x
 
105
|      write(*,*) z                    |write(*,*) z
 
106
|      return                          |return
 
107
|      end                             |end
 
108
|                                      |
 
109
+--------------------------------------+--------------------------------
 
110
.DE