(self)
| 458 | self.assertTrue(math.signbit(-arg)) |
| 459 | |
| 460 | def testCos(self): |
| 461 | self.assertRaises(TypeError, math.cos) |
| 462 | self.ftest('cos(-pi/2)', math.cos(-math.pi/2), 0, abs_tol=math.ulp(1)) |
| 463 | self.ftest('cos(0)', math.cos(0), 1) |
| 464 | self.ftest('cos(pi/2)', math.cos(math.pi/2), 0, abs_tol=math.ulp(1)) |
| 465 | self.ftest('cos(pi)', math.cos(math.pi), -1) |
| 466 | try: |
| 467 | self.assertTrue(math.isnan(math.cos(INF))) |
| 468 | self.assertTrue(math.isnan(math.cos(NINF))) |
| 469 | except ValueError: |
| 470 | self.assertRaises(ValueError, math.cos, INF) |
| 471 | self.assertRaises(ValueError, math.cos, NINF) |
| 472 | self.assertTrue(math.isnan(math.cos(NAN))) |
| 473 | |
| 474 | @unittest.skipIf(sys.platform == 'win32' and platform.machine() in ('ARM', 'ARM64'), |
| 475 | "Windows UCRT is off by 2 ULP this test requires accuracy within 1 ULP") |
nothing calls this directly
no test coverage detected