With the introduction of PetscPowRealInt() should this be moved to petscmath.h and renamed ? /* C++ does not promote int64_t to scalar or int32_t for std::pow() */ static PetscScalar Pow(PetscScalar b,PetscInt p) { return PetscPowScalar(b,(int)p); }