You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
191 B
C
11 lines
191 B
C
22 years ago
|
#include "safemult.h"
|
||
|
|
||
|
int imult32(int32 a,int32 b,int32* c) {
|
||
|
int neg=(a<0);
|
||
|
if (neg) a=-a;
|
||
|
if (b<0) { neg^=1; b=-b; }
|
||
|
if (umult32(a,b,c)) return 1;
|
||
|
if (neg) *c=-*c;
|
||
|
return 0;
|
||
|
}
|