diff --git a/Tools/PyUtils/python/scripts/diff_root_files.py b/Tools/PyUtils/python/scripts/diff_root_files.py
index d3216a0ec3c2dbb5783b6e27f9ff089bba5ad1be..8566e84e53298d7843c770dc58daed607b795c8a 100644
--- a/Tools/PyUtils/python/scripts/diff_root_files.py
+++ b/Tools/PyUtils/python/scripts/diff_root_files.py
@@ -11,6 +11,8 @@ __author__ = "Sebastien Binet"
 
 ### imports -------------------------------------------------------------------
 import PyUtils.acmdlib as acmdlib
+from math import isnan
+
 
 ### globals -------------------------------------------------------------------
 g_ALLOWED_MODES = ('summary', 'semi-detailed', 'detailed')
@@ -290,6 +292,11 @@ def main(args):
             if d_new:
                 tree_name, jentry, name, inew = d_new
 
+            # for regression testing we should have NAN == NAN
+            if isnan(iold) and isnan(inew):
+                n_good += 1
+                continue
+
             # FIXME: that's a plain (temporary?) hack
             if name[-1] in args.known_hacks:
                 continue