version 1.8, 2010/05/24 10:58:29
|
version 1.37, 2012/10/01 11:04:59
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.16 |
RPL/2 (R) version 4.1.11 |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
Copyright (C) 1989-2012 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++) |
{ |
{ |