diff options
| -rw-r--r-- | clang/utils/ABITest/TypeGen.py | 4 | ||||
| -rwxr-xr-x | clang/utils/analyzer/CmpRuns.py | 4 | 
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/utils/ABITest/TypeGen.py b/clang/utils/ABITest/TypeGen.py index 608089429ac..698e358829f 100644 --- a/clang/utils/ABITest/TypeGen.py +++ b/clang/utils/ABITest/TypeGen.py @@ -1,5 +1,5 @@  """Flexible enumeration of C types.""" -from __future__ import print_function +from __future__ import division, print_function  from Enumeration import * @@ -235,7 +235,7 @@ def fact(n):  # Compute the number of combinations (n choose k)  def num_combinations(n, k):  -    return fact(n) / (fact(k) * fact(n - k)) +    return fact(n) // (fact(k) * fact(n - k))  # Enumerate the combinations choosing k elements from the list of values  def combinations(values, k): diff --git a/clang/utils/analyzer/CmpRuns.py b/clang/utils/analyzer/CmpRuns.py index 14be963296a..87d5eda7a18 100755 --- a/clang/utils/analyzer/CmpRuns.py +++ b/clang/utils/analyzer/CmpRuns.py @@ -25,7 +25,7 @@ Usage:      diff = compareResults(resultsA, resultsB)  """ -from __future__ import print_function +from __future__ import division, print_function  from collections import defaultdict @@ -308,7 +308,7 @@ def deriveStats(results):              "mean": sum(values) / len(values),              "90th %tile": computePercentile(values, 0.9),              "95th %tile": computePercentile(values, 0.95), -            "median": sorted(values)[len(values) / 2], +            "median": sorted(values)[len(values) // 2],              "total": sum(values)          }      return combined_stats  | 

