home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / gnuc / gnulib / rcs / mulsi3.c,v < prev    next >
Encoding:
Text File  |  1992-07-04  |  407 b   |  41 lines

  1. head    1.1;
  2. access;
  3. symbols
  4.     version39-41:1.1;
  5. locks;
  6. comment    @ * @;
  7.  
  8.  
  9. 1.1
  10. date    92.06.08.19.47.59;    author mwild;    state Exp;
  11. branches;
  12. next    ;
  13.  
  14.  
  15. desc
  16. @initial checkin
  17. @
  18.  
  19.  
  20. 1.1
  21. log
  22. @Initial revision
  23. @
  24. text
  25. @#include "common.h"
  26.  
  27. SItype
  28. __mulsi3 (a, b)
  29.      SItype a,b;
  30. {
  31.   int neg = (a < 0) != (b < 0);
  32.   SItype res;
  33.  
  34.   if (a < 0) a = -a;
  35.   if (b < 0) b = -b;
  36.   
  37.   res = mulu (a,b);
  38.   return neg ? -res : res;
  39. }
  40. @
  41.