diff --git a/PhysicsAnalysis/BPhys/BPhysTools/Root/SimpleEncrypter.cxx b/PhysicsAnalysis/BPhys/BPhysTools/Root/SimpleEncrypter.cxx
index 77cc5475f19267425b78afc72be5caa696740bb2..66341ded31fd8204a7e2a05c63e5b5ef6d0ed88c 100644
--- a/PhysicsAnalysis/BPhys/BPhysTools/Root/SimpleEncrypter.cxx
+++ b/PhysicsAnalysis/BPhys/BPhysTools/Root/SimpleEncrypter.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 // system include:
@@ -21,8 +21,12 @@ namespace xAOD {
   //--------------------------------------------------------------------------
   // Private static constants
   //--------------------------------------------------------------------------
+  // This gives 0x10000 on a 64-bit platform.
+  // ??? Would probably be better to write these using bit operations,
+  // rather than FP, to avoid potential rounding issues.
+  //  (eg. the maximum uint64_t cannot be represented exactly as a double)
   const SimpleEncrypter::ULLI_t SimpleEncrypter::m_MAXRANGE =
-    (SimpleEncrypter::ULLI_t)pow(std::numeric_limits<ULLI_t>::max(), 0.25);
+    (SimpleEncrypter::ULLI_t)pow(static_cast<double>(std::numeric_limits<ULLI_t>::max()), 0.25);
   const SimpleEncrypter::ULLI_t SimpleEncrypter::m_MINRANGE =
     (SimpleEncrypter::ULLI_t)SimpleEncrypter::m_MAXRANGE/10;
   const unsigned int SimpleEncrypter::m_MAXHEXDIGITS =