[Git][ghc/ghc][master] testsuite: Use math.inf instead of division-by-zero
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Tue Dec 17 18:52:06 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
e86b1b20 by Ben Gamari at 2024-12-17T13:51:39-05:00
testsuite: Use math.inf instead of division-by-zero
This both more directly captures the intent and also fixes #25580.
- - - - -
1 changed file:
- testsuite/driver/perf_notes.py
Changes:
=====================================
testsuite/driver/perf_notes.py
=====================================
@@ -21,6 +21,7 @@ import sys
from collections import namedtuple, defaultdict
from math import ceil, trunc
+import math
from testutil import passed, failBecause, testing_metrics, print_table
from term_color import Color, colored
@@ -140,7 +141,7 @@ class MetricAcceptanceWindow:
class AlwaysAccept(MetricAcceptanceWindow):
def get_bounds(self, baseline: float) -> Tuple[float, float]:
- return (-1/0, +1/0)
+ return (-math.inf, +math.inf)
def describe(self) -> str:
raise NotImplemented
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e86b1b2013e3fcf51a753d2acfee4e50f8fc69f5
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e86b1b2013e3fcf51a753d2acfee4e50f8fc69f5
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241217/89033789/attachment-0001.html>
More information about the ghc-commits
mailing list