1 2 static char help[] = "Tests PetscInt64Mult()\n"; 3 4 #include <petscsys.h> 5 6 int main(int argc,char **argv) 7 { 8 PetscInt a = 2009,b = 5612,result,tresult; 9 PetscInt64 r64; 10 11 PetscCall(PetscInitialize(&argc,&argv,(char*)0,help)); 12 PetscCall(PetscIntMultError(a,b,&result)); 13 a = PETSC_MPI_INT_MAX-22,b = PETSC_MPI_INT_MAX/22; 14 r64 = PetscInt64Mult(a,b); 15 tresult = PetscIntMultTruncate(a,b); 16 PetscCall(PetscIntMultError(a,b,&result)); 17 PetscCall(PetscFinalize()); 18 return 0; 19 } 20