Diff for /rpl/src/depassements.c between versions 1.1 and 1.40

version 1.1, 2010/01/26 15:22:44 version 1.40, 2013/02/26 19:56:12
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.0.9    RPL/2 (R) version 4.1.12
   Copyright (C) 1989-2010 Dr. BERTRAND Joël    Copyright (C) 1989-2013 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
   
Line 20 Line 20
 */  */
   
   
 #include "rpl.conv.h"  #include "rpl-conv.h"
   
   
 /*  /*
Line 128  depassement_multiplication(integer8 *a, Line 128  depassement_multiplication(integer8 *a,
         produit_croise = (limite = (msba * lsbb)) + (msbb * lsba);          produit_croise = (limite = (msba * lsbb)) + (msbb * lsba);
   
         /*          /*
         * Traitement du débordement sur produit_croisé           * Traitement du débordement sur produit_croisé
         */           */
   
         if (produit_croise < limite)          if (produit_croise < limite)
         {          {
Line 198  depassement_puissance(integer8 *a, integ Line 198  depassement_puissance(integer8 *a, integ
         return(d_erreur);          return(d_erreur);
     }      }
   
     if ((*a) <= 1)      if ((r = abs(*a)) <= 1)
     {      {
         if ((*a) == 0)          if ((*a) == 0)
         {          {
Line 206  depassement_puissance(integer8 *a, integ Line 206  depassement_puissance(integer8 *a, integ
         }          }
         else          else
         {          {
             (*resultat) = 1;              if ((*a) > 0)
               {
                   (*resultat) = 1;
               }
               else
               {
                   (*resultat) = (((*b) % 2) == 0) ? 1 : -1;
               }
         }          }
   
         return(d_absence_erreur);          return(d_absence_erreur);
     }      }
   
     depassement = d_faux;      depassement = d_faux;
     r = abs(*a);  
   
     for(i = 0; i < (*b); i++)      for(i = 0; i < (*b); i++)
     {      {

Removed from v.1.1  
changed lines
  Added in v.1.40


CVSweb interface <joel.bertrand@systella.fr>