subroutine irs2(x,v) implicit double precision(a-h,o-z) dimension x(22),v(41),d(255) common/newshr/c(255) do 50 i=1,22 v(10+i) = x(i) 50 continue return end subroutine irs(x,v) implicit double precision(a-h,o-z) dimension x(22),v(255),d(255) common/newshr/c(255) common/calc/st(12) lawyr = x(2) do 50 i=1,255 d(i) = 0. 50 continue d(100) = x(1) d(70) = 0. d(101) = x(2) d(103) = x(2) d(7) = 1 d(8) = x(5) if(x(4).eq.2) d(7) = 2 d(2) = x(4) if(x(4).eq.3..or.x(4).eq.4.) d(2) = 4. if(x(4).eq.8.) then d(2) = 1 d(105) = 1 elseif(x(4).eq.5) then d(2) = 5 else d(105) = 0 endif if(x(4).eq.9) then d(2) = 3 d(7) = 1 d(3) = 2 endif if(x(4).eq.10) then d(2) = 6 d(7) = 2 d(3) = 2 endif if(x(4).eq.6) then d(2) = 6 d(3) = 2 endif d(9) = x(6) d(85) = x(7) d(86) = x(8) d(11) = d(85) + d(86) d(12) = 0. d(56) = 0. d(17) = 0. d(24) = 0. d(200) = 1. d(201) = 0. if(d(11).ne.0) then d(201)=d(86)/d(11) d(200) = x(7)/d(11) endif d(12) = x(9) + .001 d(176) = d(12) d(79) = x(10) d(20) = x(11) d(91) = x(12) d(41) = x(13) d(160) = x(14) d(51) = x(15) d(54) = x(16) d(64) = x(17) d(82) = x(18) d(159) = d(11) + d(12) + d(20) + d(82) + d(91) + d(41) lawyr = x(2) d(208) = int(mod(int(x(19)),100)) d(209) = 0. if(x(19).gt.99) & d(209) = d(8)-mod((int(x(19)-d(208)))/100,100) d(207) = int(x(19)/10000) d(56) = x(20) d(68) = x(21) d(70) = x(22) agep = 0 ages = 0 if(x(6).gt.8) then agep=int(x(6)/100) ages=int(mod(int(x(6)),100)) if(ages.gt.0.and.ages.lt.14) then agep = agep-1 ages = ages+100 endif d(205) = max(ages,agep) d(206) = min(ages,agep) d(9) = 0 if(agep.ge.65) d(9) = 1 if(ages.ge.65) d(9) = d(9) + 1 endif if(d(208).gt.d(8)) stop 1908 if(d(207).ge.d(208)+1) stop 1919 if(d(209).gt.d(8)) stop 1908 if(d(8)-d(209).lt.d(208)) stop 1908 if (d(8).gt.15..or.d(208).gt.15) stop 5 if(agep.lt.0.or.agep.gt.114) stop 6 if(ages.lt.0.or.ages.gt.114) stop 6 if(d(6).lt.0.or.d(6).gt.55) stop 3 if(d(6).gt.0.and.d(101).lt.1977) stop 302 if(d(101).lt.1960.or.d(101).gt.2023) stop 2 if(x(4).ne.2.and.x(7).ne.0.and.x(8).ne.0) stop 408 if(ages.gt.0.and.agep.gt.0.and.x(4).ne.2) stop 406 call tcalc(d,lawyr) c FICA tax and rate call sstax(d,lawyr) fica = c(75) if(mtr.eq.85) then ficar = c(148) elseif(mtr.eq.86) then ficar = c(149) elseif(mtr.eq.11) then ficar = c(150) else ficar = 0. endif ficar = ficar*100 v(1) = x(1) v(2) = int(d(101)) v(3) = int(d( 6)) v(4) = c(1) v(5) = c(74) v(6) = c(75) v(7) = c(148) v(8) = c(149) v(9) = ficar v(10) = c(2) v(11) = c(78) v(12) = c(79) v(13) = c(3) v(14) = c(83) v(15) = c(39) v(16) = c(34) v(17) = c(24) v(18) = c(29) v(19) = c(28) v(20) = c(174) v(21) = c(51) v(22) = c(81) v(23) = c(93) v(24) = c(53) v(25) = c(59) v(26) = c(69) v(27) = c(70) v(28) = c(52) v(29) = c(75) do 20 i=1,12 v(29+i) = st(i) 20 continue return end subroutine tcalc(data,lawyr) implicit double precision(a-h,o-z) dimension data(255) common /psubr/ xndx,amtpi,almnpx,egtrra,almzbr,almst,enders, &gjtrra,ratmul,cgmul,amtmul,tipra,wilhlc,extnd(0:100) common/newshr/comnew(255) c Compulsory itemization data(4) = -1 call tcalc2(data,lawyr) taxitm = comnew(1) + comnew(74) c Compulsory standard deduction data(4) = -2 call tcalc2(data,lawyr) taxstd = comnew(1) + comnew(74) c If itemization is better, use it if(taxitm.lt.taxstd) then data(04) = -1 call tcalc2(data,lawyr) endif return end subroutine tcalc2(data,lawyr) implicit double precision(a-h,o-z) common/calc/st(12) dimension data(255) common/newshr/comnew(255) common /psubr/ xndx,amtpi,almnpx,egtrra,almzbr,almst,enders, &gjtrra,ratmul,cgmul,amtmul,tipra,wilhlc,extnd(0:100) data(50)=0. do 10 i=1,3 call nlaw(data,lawyr) comnew(74) = 0. lawsta = lawyr do 20 ii=1,12 st(ii) = 0. 20 continue if(data(6).ne.0) then call statax(data,lawsta,comnew) data(50)=max(saletx(data,lawyr),comnew(74),0.d0) endif 10 continue 11 continue call sstax(data,lawyr) return end