8000 gh-135853: add `math.fmax` and `math.fmin` by picnixz · Pull Request #135888 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-135853: add math.fmax and math.fmin #135888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jul 12, 2025
Prev Previous commit
Next Next commit
remove misleading test
  • Loading branch information
picnixz committed Jun 27, 2025
commit ba2e77c33d313ceda6272096c9d43a7fac657578
8 changes: 0 additions & 8 deletions Lib/test/test_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,10 +632,6 @@ def test_fmax(self):
self.assertEqual(math.fmax(1., 2.), 2.)
self.assertEqual(math.fmax(2., 1.), 2.)

# fmax() does not need to be sensitive to the sign of 0 (§F.10.9.2).
self.assertEqual(math.fmax(+0., -0.), 0.)
self.assertEqual(math.fmax(-0., +0.), 0.)

self.assertEqual(math.fmax(+1., +0.), 1.)
self.assertEqual(math.fmax(+0., +1.), 1.)
self.assertEqual(math.fmax(+1., -0.), 1.)
Expand Down Expand Up @@ -679,10 +675,6 @@ def test_fmin(self):
self.assertEqual(math.fmin(1., 2.), 1.)
self.assertEqual(math.fmin(2., 1.), 1.)

# fmin() does not need to be sensitive to the sign of 0 (§F.10.9.3).
self.assertEqual(math.fmin(+0., -0.), 0.)
self.assertEqual(math.fmin(-0., +0.), 0.)

self.assertEqual(math.fmin(+1., +0.), 0.)
self.assertEqual(math.fmin(+0., +1.), 0.)
self.assertEqual(math.fmin(+1., -0.), 0.)
Expand Down
Loading
0