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 PetscFunctionBeginUser; 12 PetscCall(PetscInitialize(&argc,&argv,(char*)0,help)); 13 PetscCall(PetscIntMultError(a,b,&result)); 14 a = PETSC_MPI_INT_MAX-22,b = PETSC_MPI_INT_MAX/22; 15 r64 = PetscInt64Mult(a,b); 16 tresult = PetscIntMultTruncate(a,b); 17 PetscCall(PetscIntMultError(a,b,&result)); 18 PetscCall(PetscFinalize()); 19 return 0; 20 } 21