~ubuntu-branches/ubuntu/saucy/python-scipy/saucy

« back to all changes in this revision

Viewing changes to Lib/sandbox/spline/fitpack/fprati.f

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik
  • Date: 2008-06-16 22:58:01 UTC
  • mfrom: (2.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080616225801-irdhrpcwiocfbcmt
Tags: 0.6.0-12
* The description updated to match the current SciPy (Closes: #489149).
* Standards-Version bumped to 3.8.0 (no action needed)
* Build-Depends: netcdf-dev changed to libnetcdf-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
      real*8 function fprati(p1,f1,p2,f2,p3,f3)
2
 
c  given three points (p1,f1),(p2,f2) and (p3,f3), function fprati
3
 
c  gives the value of p such that the rational interpolating function
4
 
c  of the form r(p) = (u*p+v)/(p+w) equals zero at p.
5
 
c  ..
6
 
c  ..scalar arguments..
7
 
      real*8 p1,f1,p2,f2,p3,f3
8
 
c  ..local scalars..
9
 
      real*8 h1,h2,h3,p
10
 
c  ..
11
 
      if(p3.gt.0.) go to 10
12
 
c  value of p in case p3 = infinity.
13
 
      p = (p1*(f1-f3)*f2-p2*(f2-f3)*f1)/((f1-f2)*f3)
14
 
      go to 20
15
 
c  value of p in case p3 ^= infinity.
16
 
  10  h1 = f1*(f2-f3)
17
 
      h2 = f2*(f3-f1)
18
 
      h3 = f3*(f1-f2)
19
 
      p = -(p1*p2*h3+p2*p3*h1+p3*p1*h2)/(p1*h1+p2*h2+p3*h3)
20
 
c  adjust the value of p1,f1,p3 and f3 such that f1 > 0 and f3 < 0.
21
 
  20  if(f2.lt.0.) go to 30
22
 
      p1 = p2
23
 
      f1 = f2
24
 
      go to 40
25
 
  30  p3 = p2
26
 
      f3 = f2
27
 
  40  fprati = p
28
 
      return
29
 
      end