summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerge Steer <serge.steer@scilab.org>2007-04-29 16:40:37 +0000
committerSerge Steer <serge.steer@scilab.org>2007-04-29 16:40:37 +0000
commite064d8a033adc3bea3de97efd9a374b12e9d895f (patch)
treeb285af11f076d5b3557eb141b72e740a0b12ac63
parent829bba8d0ddca8a2997f1ab5bff6ca1fb6aa9287 (diff)
downloadscilab-e064d8a033adc3bea3de97efd9a374b12e9d895f.zip
scilab-e064d8a033adc3bea3de97efd9a374b12e9d895f.tar.gz
bug2330 fix
-rw-r--r--scilab/modules/optimization/src/fortran/n1qn1a.f7
1 files changed, 6 insertions, 1 deletions
diff --git a/scilab/modules/optimization/src/fortran/n1qn1a.f b/scilab/modules/optimization/src/fortran/n1qn1a.f
index 093db76..18aac49 100644
--- a/scilab/modules/optimization/src/fortran/n1qn1a.f
+++ b/scilab/modules/optimization/src/fortran/n1qn1a.f
@@ -15,7 +15,8 @@ c Copyright INRIA
15 real rzs(*) 15 real rzs(*)
16 external simul 16 external simul
17 double precision dnrm2 ! (blas routine) added by Bruno to get 17 double precision dnrm2 ! (blas routine) added by Bruno to get
18 ! a better information concerning directionnal derivative 18 ! a better information concerning directionnal derivative
19 integer vfinite ! added by Serge to avoid Inf and Nan's
19 1000 format (46h n1qn1 ne peut demarrer (contrainte implicite)) 20 1000 format (46h n1qn1 ne peut demarrer (contrainte implicite))
20 1001 format (40h n1qn1 termine par voeu de l'utilisateur) 21 1001 format (40h n1qn1 termine par voeu de l'utilisateur)
21 1010 format (45h n1qn1 remplace le hessien initial (qui n'est, 22 1010 format (45h n1qn1 remplace le hessien initial (qui n'est,
@@ -26,6 +27,8 @@ c calcul initial de fonction-gradient
26c 27c
27 indic=4 28 indic=4
28 call simul (indic,n,x,f,g,izs,rzs,dzs) 29 call simul (indic,n,x,f,g,izs,rzs,dzs)
30c next line added by Serge to avoid Inf and Nan's (04/2007)
31 if (vfinite(1,f).ne.1.and.vfinite(n,g).ne.1) indic=-1
29 if (indic.gt.0) go to 13 32 if (indic.gt.0) go to 13
30 if (iprint.eq.0) go to 12 33 if (iprint.eq.0) go to 12
31 if (indic.lt.0) write (lp,1000) 34 if (indic.lt.0) write (lp,1000)
@@ -177,6 +180,8 @@ c calcul de fonction-gradient
177 180 xb(i)=xa(i)+c*d(i) 180 180 xb(i)=xa(i)+c*d(i)
178 indic=4 181 indic=4
179 call simul (indic,n,xb,fb,gb,izs,rzs,dzs) 182 call simul (indic,n,xb,fb,gb,izs,rzs,dzs)
183c next line added by Serge to avoid Inf and Nan's (04/2007)
184 if (vfinite(1,fb).ne.1.and.vfinite(n,gb).ne.1) indic=-1
180c test sur indic 185c test sur indic
181 if (indic.gt.0) goto 185 186 if (indic.gt.0) goto 185
182 if (indic.lt.0) goto 183 187 if (indic.lt.0) goto 183