Actual source code: ex29.c

petsc-3.7.3 2016-08-01
Report Typos and Errors
  2: static char help[] = "Tests PetscIntMult64bit()\n";

  4: #include <petscsys.h>

  8: int main(int argc,char **argv)
  9: {
 11:   PetscInt       a = 2009,b = 5612,result,tresult;
 12:   Petsc64bitInt  r64;

 14:   PetscInitialize(&argc,&argv,(char*)0,help);
 15:   PetscIntMultError(a,b,&result);
 16:   a       = PETSC_MPI_INT_MAX-22,b = PETSC_MPI_INT_MAX/22;
 17:   r64     = PetscIntMult64bit(a,b);
 18:   tresult = PetscIntMultTruncate(a,b);
 19:   PetscIntMultError(a,b,&result);
 20:   PetscFinalize();
 21:   return 0;
 22: }