/*************************************************************************************************************************************/ /* */ /* C A L C U L D U P R O D U I T G E N E R A L I S E " A L A H O R N E R " D E D E U X N O M B R E S : */ /* */ /* */ /* */ /* Author of '$xcg/HORNER_2_04.01$K' : */ /* */ /* Jean-Francois COLONNA (LACTAMME, 20181123101410). */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* 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 : */ /* */ /*************************************************************************************************************************************/ #define PRAGMA_CPP_____AUTORISER_LE_GooF #define PRAGMA_CPP_____SI_LE_GooF_EST_ACTIVABLE_ALORS_FAIRE_DE_L_ARITHMETIQUE_ETENDUE_DES_NOMBRES_FLOTTANTS /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* F I C H I E R S D ' I N C L U D E S : */ /* */ /*************************************************************************************************************************************/ #include INCLUDES_MINI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* P A R A M E T R E S : */ /* */ /*************************************************************************************************************************************/ #define NOMBRE_1 \ FU #define NOMBRE_2 \ FU /* Les deux nombres flottants dont on va calculer le produit. */ #include xcg/ARIT.01.I" #include xci/valeurs.01.I" /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M A C R O S U T I L E S : */ /* */ /*************************************************************************************************************************************/ #include xci/valeurs.02.I" /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* C A L C U L D U P R O D U I T G E N E R A L I S E " A L A H O R N E R " D E D E U X N O M B R E S : */ /* */ /*************************************************************************************************************************************/ BCommande(nombre_d_arguments,arguments) /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock DEFV(Float,INIT(nombre_1,NOMBRE_1)); DEFV(Float,INIT(nombre_2,NOMBRE_2)); /* Les deux nombres flottants dont on va calculer le produit. */ #include xci/valeurs.03.I" /*..............................................................................................................................*/ GET_ARGUMENTS_(nombre_d_arguments ,BLOC(GET_ARGUMENT_F("x=""nombre_1=""n1=""a=",nombre_1); GET_ARGUMENT_F("y=""nombre_2=""n2=""b=",nombre_2); PROCESS_ARGUMENTS_DE_PARAMETRAGE_DE_LA_GENERATION_DE_SUITE_DE_VALEURS_1; PROCESS_ARGUMENTS_DE_PARAMETRAGE_DE_LA_GENERATION_DE_SUITE_DE_VALEURS_2; /* Ces deux procedures furent introduites le 20061226182743... */ ) ); EDITION_DE_LA_VALEUR_DE_L_OPERATEUR(USe_GooF(HORNER_2_04(nombre_1,nombre_2 ,FfHORNER_2_04_____coefficient_44 ,FfHORNER_2_04_____coefficient_43 ,FfHORNER_2_04_____coefficient_42 ,FfHORNER_2_04_____coefficient_41 ,FfHORNER_2_04_____coefficient_40 ,FfHORNER_2_04_____coefficient_34 ,FfHORNER_2_04_____coefficient_33 ,FfHORNER_2_04_____coefficient_32 ,FfHORNER_2_04_____coefficient_31 ,FfHORNER_2_04_____coefficient_30 ,FfHORNER_2_04_____coefficient_24 ,FfHORNER_2_04_____coefficient_23 ,FfHORNER_2_04_____coefficient_22 ,FfHORNER_2_04_____coefficient_21 ,FfHORNER_2_04_____coefficient_20 ,FfHORNER_2_04_____coefficient_14 ,FfHORNER_2_04_____coefficient_13 ,FfHORNER_2_04_____coefficient_12 ,FfHORNER_2_04_____coefficient_11 ,FfHORNER_2_04_____coefficient_10 ,FfHORNER_2_04_____coefficient_04 ,FfHORNER_2_04_____coefficient_03 ,FfHORNER_2_04_____coefficient_02 ,FfHORNER_2_04_____coefficient_01 ,FfHORNER_2_04_____coefficient_00 ) ) ); /* Edition du produit de deux nombres... */ /* */ /* On notera le 20181123105842, qu'utiliser ici : */ /* */ /* USe_GooF(FfHORNER_2_04(nombre_1,nombre_2)) */ /* */ /* n'a aucun sens car, en effet, la fonction 'FfHORNER_2_04(...)' est une "vraie" fonction */ /* ('v $xig/fonct$vv$FON FfHORNER_2_04') qui est compilee avec les operateurs de base (tels */ /* 'ADD2(...)' ou encore 'MUL2(....)') et il est donc trop tard pour le 'GooF'. Une solution */ /* est donc d'utiliser ici directement 'HORNER_2_04(....)', ce que je fais a cette date... */ /* On notera l'usage des 'FfHORNER_2_04_____coefficient_??'s d'une part pour simplifier */ /* et d'autre part pour prevenir un usage ulterieur de 'FfHORNER_2_04(...)'... */ /* */ /* Pour information, le 20181123112630, le calcul : */ /* */ /* $xcg/HORNER_2_04.01$X \ */ /* x=2 y=3 \ */ /* H2_04_44=1 H2_04_43=1 H2_04_42=1 H2_04_41=1 H2_04_40=1 \ */ /* H2_04_34=1 H2_04_33=1 H2_04_32=1 H2_04_31=1 H2_04_30=1 \ */ /* H2_04_24=1 H2_04_23=1 H2_04_22=1 H2_04_21=1 H2_04_20=1 \ */ /* H2_04_14=1 H2_04_13=1 H2_04_12=1 H2_04_11=1 H2_04_10=1 \ */ /* H2_04_04=1 H2_04_03=1 H2_04_02=1 H2_04_01=1 H2_04_00=1 \ */ /* pxADD2_ADD2=0 pxMUL2_ADD2=1 \ */ /* pxADD2_MUL2=1 pxMUL2_MUL2=0 */ /* */ /* donne +81189 comme resultat et +587873 pour "x=3 y=7" ('v $xtc/HORNER_2_04.etendu.01$c' */ /* a ce propos...). */ /* */ /* On notera au passage que pour "x=2 y=3" le resultat est +3751 si l'arithmetique n'est */ /* pas redefinie (pas de "px...=..."). */ RETU_Commande; Eblock ECommande