~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to routines/optim/rednor.f

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      function rednor(n,binf,bsup,x,epsx,g)
 
2
c     Copyright INRIA
 
3
      implicit double precision (a-h,o-z)
 
4
      dimension binf(n),bsup(n),x(n),epsx(n),g(n)
 
5
      rednor=0.0d+0
 
6
      do 1 i=1,n
 
7
      aa=g(i)
 
8
      if(x(i)-binf(i).le.epsx(i))aa=min(0.0d+0,aa)
 
9
      if(bsup(i)-x(i).le.epsx(i))aa=max(0.0d+0,aa)
 
10
1     rednor=rednor + aa**2
 
11
      rednor=sqrt(rednor)
 
12
      end