      SUBROUTINE SGR29 (Z, U, T)
c Copyright (c) 1996 California Institute of Technology, Pasadena, CA.
c ALL RIGHTS RESERVED.
c Based on Government Sponsored Research NAS7-03001.
c>> 1994-10-20 SGR29 Krogh  Changes to use M77CON
c>> 1994-05-10 SGR29 WVS produce SP and DP versions from same source.
c>> 1993-08-03 SGR29 CLL Edited DATA stmts for conversion to C.
c>> 1993-07-21 SGR29 WVS JPL Conversion from NSWC to Math 77
c--S replaces "?": ?GR29
C ----------------------------------------------------------------------
C
C            ALGORITHM USING MINIMAX APPROXIMATIONS
C
C ----------------------------------------------------------------------
      REAL             Z, U, T
      REAL             A0(7), A1(7), A2(7), A3(7), A4(7), A5(7), A6(4),
     *                 A7(5), A8(5), A9(5), A10(4), A11(4), A12(4),
     *                 A13(3), A14(3), A15(2), A16(2), A17(1), A18(1)
      REAL             B0(9), B1(9), B2(8), B3(8), B4(8), B5(7), B6(9),
     *                 B7(7), B8(7), B9(6), B10(6), B11(5), B12(4),
     *                 B13(4), B14(2), B15(2), B16(1)
      REAL             C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10,
     *                 C11, C12, C13, C14, C15, C16
      REAL             D0(7)
      REAL             D01, D02, D03, D04, D05
      PARAMETER (D01 =-1.0E0 / 3.0E0)
      PARAMETER (D02 = 1.0E0 / 12.0E0)
      PARAMETER (D03 =-2.0E0 / 135.0E0)
      PARAMETER (D04 = 1.0E0 / 864.0E0)
      PARAMETER (D05 = 1.0E0 / 2835.0E0)
C --------------------------
      DATA D0  / D01 ,  D02 ,  D03 , D04,  D05 ,
     *     -.178755144032921810699588477366E-03,
     *      .391926317852243778169704095630E-04/
C --------------------------
      DATA A0    /-.234443848930188413698825870E-08,
     *            -.408902435641223939887180303E-07,
     *            -.327874000161065050049103731E-06,
     *            -.145717031728609218851588740E-05,
     *            -.372722892959910688597417881E-05,
     *            -.490033281596113358850307112E-05,
     *            -.218544851067999216147364227E-05/
      DATA B0    /-.129786815987713980865910767E-09,
     *             .319268409139858531586963150E-08,
     *             .597739416777031660496708557E-04,
     *             .131659965062389880196860991E-02,
     *             .138263099503103838517015533E-01,
     *             .866750030433403450681521877E-01,
     *             .349373447613102956696810725E+00,
     *             .902581259032419042347458484E+00,
     *             .139388806936391316154237713E+01/
C --------------------------
      DATA A1    /-.162671127226300802902860047E-05,
     *            -.359791514993122440319624428E-04,
     *            -.334816794629374699945489443E-03,
     *            -.167787748352827199882047653E-02,
     *            -.462960105006279850867332060E-02,
     *            -.627269388216833251971110268E-02,
     *            -.185185185185185185185185200E-02/
      DATA B1     /.361538770500640888027927000E-09,
     *             .974094440943696092434381137E-05,
     *             .275463718595762102271929980E-03,
     *             .356903970692700621824901511E-02,
     *             .276755209895072417713430394E-01,
     *             .140741499324744724262767201E+00,
     *             .482173396010404307346794795E+00,
     *             .109307843990990308990473663E+01,
     *             .151225469637089956064399494E+01/
C --------------------------
      DATA A2     /.100841467329617467204527243E-06,
     *             .261809837060522545971782889E-05,
     *             .351658023234640143803014403E-04,
     *             .287368655528567495658887760E-03,
     *             .138385867950361368914038461E-02,
     *             .365985331203490698463644329E-02,
     *             .413359788359788359788359644E-02/
      DATA B2     /.144996224602847932479320241E-04,
     *             .378705615967233119938297206E-03,
     *             .457258679387716305283282667E-02,
     *             .333036784835643463383606186E-01,
     *             .160392471625881407829191009E+00,
     *             .524238095721639512312120765E+00,
     *             .114320896084982707537755002E+01,
     *             .153405837991415136438992306E+01/
C --------------------------
      DATA A3     /.352304123782956092061364635E-06,
     *             .695396758348887902366951353E-05,
     *             .620467118988901865955998784E-04,
     *             .331552280167649130371474456E-03,
     *             .987931909328964685388525477E-03,
     *             .141844584435355290321010006E-02,
     *             .649434156378600823045102236E-03/
      DATA B3     /.656342109234806261144233394E-04,
     *             .130398975231883219976260776E-02,
     *             .126418031281256648240652355E-01,
     *             .760733201461716525855765749E-01,
     *             .308149284260387354956024487E+00,
     *             .856743428738899911100227393E+00,
     *             .159678625605457556492814589E+01,
     *             .183078413578083710405050462E+01/
C --------------------------
      DATA A4    /-.260879135093022176005540138E-07,
     *            -.470448694272734954500324169E-06,
     *            -.487392507564453824976295590E-05,
     *            -.337525643163070607393381432E-04,
     *            -.173138093150706317400323103E-03,
     *            -.619343030286408407629007048E-03,
     *            -.861888290916711698604710684E-03/
      DATA B4     /.561738585657138771286755470E-04,
     *             .104553622856827932853059322E-02,
     *             .990129468337836044520381371E-02,
     *             .590964360473404599955095091E-01,
     *             .241580582651643837306299024E+00,
     *             .686949677014349678482109368E+00,
     *             .133507902144433100426436242E+01,
     *             .162826466816694512158165085E+01/
C --------------------------
      DATA A5    /-.116166342948098688243985652E-07,
     *             .506465072067030007394288471E-08,
     *            -.556701576804390213081214801E-05,
     *            -.332229941748769925615918550E-04,
     *            -.171902547619915856635305717E-03,
     *            -.548868487607991087508092013E-03,
     *            -.336798553366358151161633777E-03/
      DATA B5     /.106576106868815233442641444E-03,
     *             .280714123386276098548285440E-02,
     *             .254669201041872409738119341E-01,
     *             .136071713023783507468096673E+00,
     *             .462890328922621047510807887E+00,
     *             .103913867517817784825064299E+01,
     *             .142263185288429590449288300E+01/
C --------------------------
      DATA A6     /.118384620224413424936260301E-04,
     *             .694345283181981060040314140E-05,
     *             .209213745619758030399432459E-03,
     *             .531307936463992224884286210E-03/
      DATA B6    /-.633002360430352916354621750E-05,
     *            -.248639208901374031411609873E-04,
     *             .151734058829700925162000373E-03,
     *             .477475914272399601740818883E-02,
     *             .384410125775084107229541456E-01,
     *             .184699876959596092801262547E+00,
     *             .571784440733980642101712125E+00,
     *             .118432122801495778365352945E+01,
     *             .150831585220968267709550582E+01/
C --------------------------
      DATA A7     /.972342656522493967167788395E-05,
     *             .462793722775687016808279009E-04,
     *             .208913588225005764102252127E-03,
     *             .605983804794748515383615779E-03,
     *             .344367606892381545765962366E-03/
      DATA B7     /.215964480325937088444595990E-03,
     *             .621296161441756044580440529E-02,
     *             .497403555098433701440032746E-01,
     *             .230812334251394761909158355E+00,
     *             .682159830165959997577293001E+00,
     *             .133753662990343866552766613E+01,
     *             .160951809815647533045690195E+01/
C --------------------------
      DATA A8    /-.231069438570167401077137510E-05,
     *            -.192877995065652524742879002E-04,
     *            -.282551884312564905942488077E-04,
     *            -.353272052089782073130912603E-03,
     *            -.652623918595320914510590273E-03/
      DATA B8     /.156052480203446255774109882E-02,
     *             .189231675289329563916597032E-01,
     *             .110127834209242088316741250E+00,
     *             .407929996207245634766606879E+00,
     *             .101702505946784412105505734E+01,
     *             .172269407630659768618234623E+01,
     *             .182765408802230546887514255E+01/
C --------------------------
      DATA A9    /-.203007139532451428594124139E-04,
     *            -.120148495117517992204095691E-03,
     *            -.377126645910917006921076652E-03,
     *            -.109151697941931403194363814E-02,
     *            -.596761290192642722092337263E-03/
      DATA B9     /.108808775028021530146610124E-01,
     *             .803149717787956717154553908E-01,
     *             .335555306170768573903990019E+00,
     *             .881575022436158946373557744E+00,
     *             .156222230858412078350692234E+01,
     *             .170833470935668756293234818E+01/
C --------------------------
      DATA A10   / .475862254251166503473724173E-04,
     *            -.352503880413640910997936559E-04,
     *             .580375987713106460207815603E-03,
     *             .133244544950730832649306319E-02/
      DATA B10    /.161103572271541189817119144E-01,
     *             .114651544043625219459951640E+00,
     *             .448280675300097555552484502E+00,
     *             .110810715319704031415255670E+01,
     *             .183146436130501918547134176E+01,
     *             .187235769169449339141968881E+01/
C --------------------------
      DATA A11    /.121185049262809526794966703E-03,
     *             .717725173388339108430635016E-05,
     *             .246371734409638623215800502E-02,
     *             .157972766214718575927904484E-02/
      DATA B11    /.794610889405176143379963912E-02,
     *             .131627017265860324219513170E+00,
     *             .505939635317477779328000706E+00,
     *             .116082103318559904744144217E+01,
     *             .145670749780693850410866175E+01/
C --------------------------
      DATA A12   /-.246294151509758620837749269E-03,
     *             .650624975008642297405944869E-03,
     *            -.214376520139497301154749750E-03,
     *            -.407251199495291398243480255E-02/
      DATA B12    /.168390445944818504703640731E+00,
     *             .653453590771198550320727688E+00,
     *             .140298208333879535577602171E+01,
     *             .162497775209192630951344224E+01/
C --------------------------
      DATA A13   /-.159520095187034545391135461E-02,
     *            -.109727312966041723997078734E-01,
     *            -.594758070915055362667114240E-02/
      DATA B13    /.207815761771742289849225339E+00,
     *             .790935125477975506817064616E+00,
     *             .158706682625067673596619095E+01,
     *             .175409273929961597148916309E+01/
C --------------------------
      DATA A14   / .245543970647383469794050102E-02,
     *            -.119636668153843644820445054E-01,
     *             .175722793448246103440764372E-01/
      DATA B14    /.676925518749829493412063599E+00,
     *             .100158659226079685399214158E+01/
C --------------------------
      DATA A15    /.588261033368548917447688791E-01,
     *             .400765463491067514929787780E-01/
      DATA B15    /.124266359850901469771032599E+01,
     *             .149189509890654955611528542E+01/
C --------------------------
      DATA A16   / .119522261141925960204472459E+00,
     *            -.100326700196947262548667584E+00/
      DATA B16    /.536462039767059451769400255E+00/
C --------------------------
      DATA A17   /-.259949826752497731336860753E+00/
C --------------------------
      DATA A18    /.724036968309299822373280436E+00/
C --------------------------
C
      T = ((((((A0(1)*Z + A0(2))*Z + A0(3))*Z + A0(4))*Z + A0(5))*Z +
     *          A0(6))*Z + A0(7)) / (((((((((B0(1)*Z + B0(2))*Z +
     *          B0(3))*Z + B0(4))*Z + B0(5))*Z + B0(6))*Z + B0(7))*Z +
     *          B0(8))*Z + B0(9))*Z + 1.0E0)
      C0 = ((((((T*Z + D0(7))*Z + D0(6))*Z + D0(5))*Z + D0(4))*Z +
     *                 D0(3))*Z + D0(2))*Z + D0(1)
      C1 = ((((((A1(1)*Z + A1(2))*Z + A1(3))*Z + A1(4))*Z + A1(5))*Z +
     *           A1(6))*Z + A1(7)) / (((((((((B1(1)*Z + B1(2))*Z +
     *           B1(3))*Z + B1(4))*Z + B1(5))*Z + B1(6))*Z + B1(7))*Z +
     *           B1(8))*Z + B1(9))*Z + 1.0E0)
      C2 = ((((((A2(1)*Z + A2(2))*Z + A2(3))*Z + A2(4))*Z + A2(5))*Z +
     *           A2(6))*Z + A2(7)) / ((((((((B2(1)*Z + B2(2))*Z +
     *           B2(3))*Z + B2(4))*Z + B2(5))*Z + B2(6))*Z + B2(7))*Z +
     *           B2(8))*Z + 1.0E0)
      C3 = ((((((A3(1)*Z + A3(2))*Z + A3(3))*Z + A3(4))*Z + A3(5))*Z +
     *           A3(6))*Z + A3(7)) / ((((((((B3(1)*Z + B3(2))*Z +
     *           B3(3))*Z + B3(4))*Z + B3(5))*Z + B3(6))*Z + B3(7))*Z +
     *           B3(8))*Z + 1.0E0)
      C4 = ((((((A4(1)*Z + A4(2))*Z + A4(3))*Z + A4(4))*Z + A4(5))*Z +
     *           A4(6))*Z + A4(7)) / ((((((((B4(1)*Z + B4(2))*Z +
     *           B4(3))*Z + B4(4))*Z + B4(5))*Z + B4(6))*Z + B4(7))*Z +
     *           B4(8))*Z + 1.0E0)
      C5 = ((((((A5(1)*Z + A5(2))*Z + A5(3))*Z + A5(4))*Z + A5(5))*Z +
     *           A5(6))*Z + A5(7)) / (((((((B5(1)*Z + B5(2))*Z +
     *           B5(3))*Z + B5(4))*Z + B5(5))*Z + B5(6))*Z + B5(7))*Z +
     *           1.0E0)
      C6 = (((A6(1)*Z + A6(2))*Z + A6(3))*Z + A6(4)) /(((((((((B6(1)*Z +
     *           B6(2))*Z + B6(3))*Z + B6(4))*Z + B6(5))*Z + B6(6))*Z +
     *           B6(7))*Z + B6(8))*Z + B6(9))*Z + 1.0E0)
      C7 = ((((A7(1)*Z + A7(2))*Z + A7(3))*Z + A7(4))*Z + A7(5)) /
     *     (((((((B7(1)*Z + B7(2))*Z + B7(3))*Z + B7(4))*Z + B7(5))*Z +
     *            B7(6))*Z + B7(7))*Z + 1.0E0)
      C8 = ((((A8(1)*Z + A8(2))*Z + A8(3))*Z + A8(4))*Z + A8(5)) /
     *     (((((((B8(1)*Z + B8(2))*Z + B8(3))*Z + B8(4))*Z + B8(5))*Z +
     *            B8(6))*Z + B8(7))*Z + 1.0E0)
      C9 = ((((A9(1)*Z + A9(2))*Z + A9(3))*Z + A9(4))*Z + A9(5)) /
     *     ((((((B9(1)*Z + B9(2))*Z + B9(3))*Z + B9(4))*Z + B9(5))*Z +
     *           B9(6))*Z + 1.0E0)
      C10 = (((A10(1)*Z + A10(2))*Z + A10(3))*Z + A10(4)) /
     *      ((((((B10(1)*Z + B10(2))*Z + B10(3))*Z + B10(4))*Z +
     *            B10(5))*Z + B10(6))*Z + 1.0E0)
      C11 = (((A11(1)*Z + A11(2))*Z + A11(3))*Z + A11(4)) /
     *      (((((B11(1)*Z + B11(2))*Z + B11(3))*Z + B11(4))*Z +
     *           B11(5))*Z + 1.0E0)
      C12 = (((A12(1)*Z + A12(2))*Z + A12(3))*Z + A12(4)) /
     *      ((((B12(1)*Z + B12(2))*Z + B12(3))*Z + B12(4))*Z + 1.0E0)
      C13 = ((A13(1)*Z + A13(2))*Z + A13(3)) / ((((B13(1)*Z +
     *        B13(2))*Z + B13(3))*Z + B13(4))*Z + 1.0E0)
      C14 = ((A14(1)*Z + A14(2))*Z + A14(3)) / ((B14(1)*Z +
     *        B14(2))*Z + 1.0E0)
      C15 = (A15(1)*Z + A15(2)) / ((B15(1)*Z + B15(2))*Z + 1.0E0)
      C16 = (A16(1)*Z + A16(2)) / (B16(1)*Z + 1.0E0)
C
      T = (A18(1)*U + A17(1))*U + C16
      T = (((((((((((((((T*U + C15)*U + C14)*U + C13)*U + C12)*U +
     *           C11)*U + C10)*U + C9)*U + C8)*U + C7)*U + C6)*U +
     *           C5)*U + C4)*U + C3)*U + C2)*U + C1)*U + C0
C
      RETURN
      END
