/*************************************************************************************************************************************/ /* */ /* T E S T D E L A D E R I V A T I O N F O R M E L L E : */ /* */ /* */ /* Author of '$xtKg/derivees.21$K' : */ /* */ /* Jean-Francois COLONNA (LACTAMME, 1993??????????). */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* I N T E R F A C E ' listG ' : */ /* */ /* */ /* :Debut_listG: */ /* :Fin_listG: */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* D I R E C T I V E S S P E C I F I Q U E S D E C O M P I L A T I O N : */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* F I C H I E R S D ' I N C L U D E S : */ /* */ /*************************************************************************************************************************************/ #include INCLUDES_BASE #include xtKg/derivees.21.I" #include xrq/Laguerre.11.I" #include xrq/Legendre.11.I" #include xrq/Hspherik.11.I" /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* P A R A M E T R E S : */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M A C R O S U T I L E S : */ /* */ /*************************************************************************************************************************************/ #define PRINT(titre,fonction) \ Bblock \ CAL2(Prin2("%-40s : Fonction=%#+14.8f\n" \ ,titre \ ,fonction \ ) \ ); \ /* On notera l'utilisation de "%f" (et non pas de "%g" comme a l'habitude) a cause d'un bug */ \ /* explicite dans 'v $Dbugs/SGIND424$D/IRIX$D/CC$D/printf.01$c'. */ \ Eblock /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* T E S T D E L A D E R I V A T I O N F O R M E L L E : */ /* */ /*************************************************************************************************************************************/ BCommande(nombre_d_arguments,arguments) /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock DEFV(Float,INIT(x1,FLOT(UN))); DEFV(Float,INIT(d_x1,d_FVARIABLES_DE_DERIVATION)); DEFV(Float,INIT(x2,FLOT(DEUX))); DEFV(Float,INIT(d_x2,d_FVARIABLES_DE_DERIVATION)); DEFV(Float,INIT(x3,FLOT(TROIS))); DEFV(Float,INIT(d_x3,d_FVARIABLES_DE_DERIVATION)); DEFV(Float,INIT(x4,FLOT(QUATRE))); DEFV(Float,INIT(d_x4,d_FVARIABLES_DE_DERIVATION)); DEFV(Float,INIT(xm,FLOT__UNDEF)); DEFV(Float,INIT(d_xm,d_FVARIABLES_DE_DERIVATION)); DEFV(Float,INIT(harmonique_spherique_R,FLOT__UNDEF)); DEFV(Float,INIT(harmonique_spherique_I,FLOT__UNDEF)); /*..............................................................................................................................*/ GET_ARGUMENTS_(nombre_d_arguments ,BLOC(VIDE;) ); PRINT("d10 : Polynomes de Laguerre (-2)" ,LAGUERRE(x3,ORDRE1,ORDRE0) ); PRINT("d20 : Polynomes de Laguerre (-1)" ,LAGUERRE(x3,ORDRE2,ORDRE0) ); PRINT("d30 : Polynomes de Laguerre (+6)" ,LAGUERRE(x3,ORDRE3,ORDRE0) ); PRINT("d11 : Polynomes de Laguerre" ,LAGUERRE(x3,ORDRE1,ORDRE1) ); PRINT("d21 : Polynomes de Laguerre" ,LAGUERRE(x3,ORDRE2,ORDRE1) ); PRINT("d12 : Polynomes de Laguerre" ,LAGUERRE(x3,ORDRE1,ORDRE2) ); PRINT("d10 : Polynomes de Legendre (+3)" ,LEGENDRE(x3,ORDRE1,ORDRE0) ); PRINT("d20 : Polynomes de Legendre (+13)" ,LEGENDRE(x3,ORDRE2,ORDRE0) ); PRINT("d30 : Polynomes de Legendre (+63)" ,LEGENDRE(x3,ORDRE3,ORDRE0) ); PRINT("d30 : premiere composante" ,PUIX(NEGA(FU),ORDRE0) ); PRINT("d30 : deuxieme composante" ,RACX(DIVI(MUL2(AXPB(DEUX,ORDRE3,UN),FACT(SOUS(ORDRE3,ORDRE0))),MUL2(GRO4(PI),FACT(ADD2(ORDRE3,ORDRE0))))) ); EGAL(xm,COSX(x2)); PRINT("d30 : troisieme composante" ,LEGENDRE(xm,ORDRE3,ORDRE0) ); PRINT("d30 : quatrieme composante (cos)" ,COSX(MUL2(ORDRE0,x3)) ); PRINT("d30 : quatrieme composante (sin)" ,SINX(MUL2(ORDRE0,x3)) ); HARMONIQUES_SPHERIQUES_R(harmonique_spherique_R,x2,x3,ORDRE3,ORDRE0); PRINT("d30 : Harmoniques spheriques R" ,harmonique_spherique_R ); HARMONIQUES_SPHERIQUES_I(harmonique_spherique_I,x2,x3,ORDRE3,ORDRE0); PRINT("d30 : Harmoniques spheriques I" ,harmonique_spherique_I ); CAL2(Prin0("\n")); RETU_Commande; Eblock ECommande