﻿271 
  DO 
  275 
  K3=1»K3XA 
  

  

  KXLY*N3(LtK3) 
  

  

  DISC=RTLOI 
  •» 
  KXLY 
  

  

  QUAL3=JUAL3(L*K3> 
  » 
  .01 
  

  

  YLD3=JLD3<L»K3> 
  * 
  .1 
  

   275 
  DK3=OK3* 
  (YLD3*PR 
  (3*M) 
  *QUAL3* 
  < 
  1 
  . 
  *CPR 
  ( 
  3 
  *M) 
  »N3 
  (L*K3) 
  ) 
  /DISC) 
  

   280 
  TDVAL=DK1*DK2*DK3-0ANC-DCANC-DKC 
  

  

  IF(NZ-1)290*290*295 
  

   290 
  VALIN<L*I)=TDVAL 
  * 
  ( 
  1 
  .*1 
  ./ 
  (DISCO-1 
  . 
  ) 
  ) 
  

  

  GO 
  TO 
  340 
  

   295 
  DFVAL=FVAL(N) 
  /DISCO 
  

  

  VALIN 
  <L 
  1 
  1 
  ) 
  =TDVAL*DFVAL 
  

  

  IF 
  (VALIN(L* 
  I> 
  > 
  330*340*340 
  

   330 
  VALIN(|_»I)=0.0 
  

  

  NZER0=2 
  

   340 
  CONTINUE 
  

   345 
  CONTINUE 
  

  

  DO 
  1308 
  I=1»LEN6TH 
  

  

  RATE<I)=RATE(I)*100*0 
  

  

  1308 
  CONTINUE 
  

  

  IF 
  (IOUT.GT.l) 
  1320*1208 
  

   1208 
  WRITE(6i*l3o9) 
  (NAME 
  ( 
  I 
  ) 
  » 
  1=1 
  ♦ 
  20> 
  

  

  1309 
  FORMAT 
  ( 
  1H1 
  » 
  12HPR0BLEM 
  NO. 
  *2oA4> 
  

   DO 
  1311 
  L=1*LX 
  

  

  DO 
  1312 
  1=1 
  »LENGTH 
  

  

  IF 
  (VALIN(L»I) 
  .GT. 
  0.0) 
  1312*1207 
  

   1207 
  IF 
  (VALIN(L»I) 
  .EQ. 
  0.0) 
  1314*1206 
  

   1206 
  IF 
  (I.EQ.D 
  1316*1205 
  

  

  1205 
  WRITE 
  (61*1313) 
  LI 
  (D 
  *RATE(I-1) 
  *RATE 
  ( 
  I 
  ) 
  » 
  VALIN 
  (L 
  ♦ 
  1-1 
  ) 
  * 
  VALIN 
  (L* 
  I 
  ) 
  

  

  1313 
  FORMAT 
  ( 
  1 
  HO 
  » 
  3 
  7H 
  INTERNAL 
  RATE 
  OF 
  RETURN 
  FOR 
  SCHEDULE 
  *A4»12H 
  IS 
  BET 
  

  

  1 
  WEEN 
  *F5.1*5H 
  AND 
  *F5.1/1H 
  *23HWITH 
  PRESENT 
  WORTHS 
  OF 
  *F6.2*5H 
  AND 
  

  

  2 
  *F6.2,15H 
  RESPECTIVELY. 
  ) 
  

   GO 
  TO 
  1311 
  

  

  1314 
  WRITE(61*1315) 
  LI 
  (L> 
  *RATE 
  ( 
  I 
  ) 
  

  

  1315 
  FORMAT 
  ( 
  1H0* 
  37H 
  INTERNAL 
  RATE 
  OF 
  RETURN 
  FOR 
  SCHEDULE 
  *A4»4H 
  IS 
  .F7. 
  

   11/) 
  

  

  GO 
  TO 
  1311 
  

   1312 
  CONTINUE 
  

  

  1316 
  WRITE 
  (61*1317) 
  LI 
  (L> 
  *RATE 
  ( 
  I 
  ) 
  * 
  VALIN 
  (L* 
  I 
  ) 
  

  

  1317 
  FORMAT 
  ( 
  1 
  HO 
  *37H 
  INTERNAL 
  RATE 
  OF 
  RETURN 
  FOR 
  SCHEDULE 
  »A4*32H 
  IS 
  NOT 
  

   1 
  INCLUOEO 
  IN 
  THE 
  PROBLEM.) 
  

  

  1311 
  CONTINUE 
  

  

  1320 
  IFdOUT.EQ. 
  0)4665*1204 
  

   1204 
  WRITE(61*1309) 
  (NAME 
  (I) 
  t 
  1*1*20) 
  

   WRITE 
  (61*38) 
  

  

  38 
  FORMAT 
  (70H 
  PRESENT 
  DISCOUNTED 
  NET 
  WORTH 
  AT 
  GIVEN 
  ALTERNATIVE 
  RA 
  

   ITES 
  OF 
  INTEREST) 
  

   fF 
  ltZ-21 
  1300*1X01*1301 
  

  

  1300 
  WRITE(61»40) 
  (LY 
  (L) 
  »L=1 
  *3) 
  

  

  40 
  FORMAT 
  (7H0 
  RATE* 
  15Xt 
  13*2 
  ( 
  17X* 
  13) 
  /) 
  

   GO 
  TO 
  1302 
  

  

  1301 
  WRITE 
  (61 
  »1303) 
  (LI 
  <D 
  *L=1 
  »2) 
  

  

  1303 
  FORMAT 
  (7H0 
  RATE* 
  liX*A4*2 
  ( 
  16X*A4) 
  /) 
  

  

  1302 
  CONTINUE 
  

  

  DO 
  365 
  1*1 
  t 
  LENGTH 
  

  

  WRITE 
  (61*41) 
  RATE 
  ( 
  I 
  ) 
  » 
  (VALIN 
  (L* 
  I) 
  *L*1*LX) 
  

  

  41 
  FORMAT 
  (1H 
  »F7 
  . 
  1 
  » 
  3F20 
  .2) 
  

   365 
  CONTINUE 
  

  

  4665 
  DO 
  4667 
  I=1*LENGTH 
  

   4667 
  RATE(I)»RATE(I)/100.0 
  

   390 
  CONTINUE 
  

  

  C 
  

  

  C 
  READ 
  CARD 
  12 
  t 
  END 
  OF 
  PROBLEM 
  

   READ(60*1D 
  I 
  END 
  

   IF 
  (IEND-98) 
  400* 
  142*410 
  

   400 
  WRITE(61»42) 
  

  

  42 
  FORMAT 
  (23H0 
  ERROR 
  IN 
  INPUT 
  CARDS) 
  

   410 
  STOP 
  

  

  END 
  

  

  3200 
  FORTRAN 
  DIAGNOSTIC 
  RESULTS 
  - 
  FOR 
  INVEST2 
  

  

  NO 
  ERRORS 
  

   LOAD, 
  56 
  

   RUN* 
  15 
  

  

  37 
  

  

  