(self)
| 426 | assert sqrt == data_sqrt |
| 427 | |
| 428 | def test_square(self): |
| 429 | pinf, ninf, nan = self._pinfinity(), self._ninfinity(), self._nan() |
| 430 | data = self._data() |
| 431 | vdata = self.load(self._data()) |
| 432 | # square |
| 433 | square_cases = ((nan, nan), (pinf, pinf), (ninf, pinf)) |
| 434 | for case, desired in square_cases: |
| 435 | data_square = [desired] * self.nlanes |
| 436 | square = self.square(self.setall(case)) |
| 437 | assert square == pytest.approx(data_square, nan_ok=True) |
| 438 | |
| 439 | data_square = [x * x for x in data] |
| 440 | square = self.square(vdata) |
| 441 | assert square == data_square |
| 442 | |
| 443 | @pytest.mark.parametrize("intrin, func", [("ceil", math.ceil), |
| 444 | ("trunc", math.trunc), ("floor", math.floor), ("rint", round)]) |
nothing calls this directly
no test coverage detected