abc/src/bdd/cudd/cuddApa.c
/**Function********************************************************************

  Synopsis    [Adds two arbitrary precision integers.]

  Description [Adds two arbitrary precision integers.  Returns the
  carry out of the most significant digit.]

  SideEffects [The result of the sum is stored in parameter <code>sum</code>.]

  SeeAlso     []

******************************************************************************/
Function
Synopsis    [Adds two arbitrary precision integers.]

Description [Adds two arbitrary precision integers.  Returns the
carry out of the most significant digit.]

SideEffects [The result of the sum is stored in parameter sum.]


Function Synopsis [ Adds two arbitrary precision integers . ] Description [ Adds two arbitrary precision integers . Returns the carry out of the most significant digit . ] SideEffects [ The result of the sum is stored in parameter sum . ]
DdApaDigit
Cudd_ApaAdd(
  int  digits,
  DdApaNumber  a,
  DdApaNumber  b,
  DdApaNumber  sum)
{
    int i;
    DdApaDoubleDigit partial = 0;
    for (i = digits - 1; i >= 0; i--) {
        partial = a[i] + b[i] + DD_MSDIGIT(partial);
        sum[i] = (DdApaDigit) DD_LSDIGIT(partial);
    }
    return((DdApaDigit) DD_MSDIGIT(partial));
}
DdApaDigit Cudd_ApaAdd ( int digits , DdApaNumber a , DdApaNumber b , DdApaNumber sum ) { int i ; DdApaDoubleDigit partial = 0 ; for ( i = digits - 1 ; i >= 0 ; i -- ) { partial = a [ i ] + b [ i ] + DD_MSDIGIT ( partial ) ; sum [ i ] = ( DdApaDigit ) DD_LSDIGIT ( partial ) ; } return ( ( DdApaDigit ) DD_MSDIGIT ( partial ) ) ; }
Function
Synopsis    [Adds two arbitrary precision integers.]
Function Synopsis [ Adds two arbitrary precision integers . ]