[petsc-dev] [petsc-maint #74896] Re: What was the 64-bit problem with pow()?

2011-06-01 Thread Jed Brown
On Wed, Jun 1, 2011 at 14:51, Matthew Knepley wrote: > >> Isn't it casting to PowInt which is int? > > > Not exactly. If I define > > #define PetscPowScalar(a, b) std::pow(a, (int) b) > Barry was not suggesting this. > > then this call > > PetscPowScalar(2.0, 0.333) > > will not work corre

[petsc-dev] [petsc-maint #74896] Re: What was the 64-bit problem with pow()?

2011-06-01 Thread Matthew Knepley
On Wed, Jun 1, 2011 at 9:06 AM, Jed Brown wrote: > On Wed, Jun 1, 2011 at 14:51, Matthew Knepley wrote: > >> >>> Isn't it casting to PowInt which is int? >> >> >> Not exactly. If I define >> >> #define PetscPowScalar(a, b) std::pow(a, (int) b) >> > > Barry was not suggesting this. > > >> >> th

[petsc-dev] [petsc-maint #74896] Re: What was the 64-bit problem with pow()?

2011-06-01 Thread Matthew Knepley
On Wed, Jun 1, 2011 at 7:29 AM, Barry Smith wrote: > > On May 31, 2011, at 9:56 PM, Matthew Knepley wrote: > > > On Tue, May 31, 2011 at 9:45 PM, Barry Smith wrote: > > > >> > >> Man that PowInt is one ugly mo-fo. Since an int is an int is an int > why > >> do you need the PowInt? Why not just

[petsc-dev] [petsc-maint #74896] Re: What was the 64-bit problem with pow()?

2011-06-01 Thread Barry Smith
On May 31, 2011, at 9:56 PM, Matthew Knepley wrote: > On Tue, May 31, 2011 at 9:45 PM, Barry Smith wrote: > >> >> Man that PowInt is one ugly mo-fo. Since an int is an int is an int why >> do you need the PowInt? Why not just caste with (int)? Instead of increasing >> the complexity of PETSc