(self)
| 404 | assert vabs == data |
| 405 | |
| 406 | def test_sqrt(self): |
| 407 | pinf, ninf, nan = self._pinfinity(), self._ninfinity(), self._nan() |
| 408 | data = self._data() |
| 409 | vdata = self.load(self._data()) |
| 410 | |
| 411 | sqrt_cases = ((-0.0, -0.0), (0.0, 0.0), (-1.0, nan), (ninf, nan), (pinf, pinf)) |
| 412 | for case, desired in sqrt_cases: |
| 413 | data_sqrt = [desired]*self.nlanes |
| 414 | sqrt = self.sqrt(self.setall(case)) |
| 415 | assert sqrt == pytest.approx(data_sqrt, nan_ok=True) |
| 416 | |
| 417 | data_sqrt = self.load([math.sqrt(x) for x in data]) # load to truncate precision |
| 418 | sqrt = self.sqrt(vdata) |
| 419 | assert sqrt == data_sqrt |
| 420 | |
| 421 | def test_square(self): |
| 422 | pinf, ninf, nan = self._pinfinity(), self._ninfinity(), self._nan() |
nothing calls this directly
no test coverage detected