File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1693,3 +1693,25 @@ def test_heaviside_broadcast():
16931693 assert result .dtype .name == "QuadPrecDType128"
16941694 np .testing .assert_array_equal (result .astype (float ), expected )
16951695
1696+
1697+ @pytest .mark .parametrize ("func" , [np .conj , np .conjugate ])
1698+ @pytest .mark .parametrize ("value" , [
1699+ 0.0 ,
1700+ - 0.0 ,
1701+ 1.5 ,
1702+ - 1.5 ,
1703+ np .inf ,
1704+ - np .inf ,
1705+ np .nan ,
1706+ ])
1707+ def test_conj_conjugate_identity (func , value ):
1708+ """Test that conj and conjugate are identity (no-op) for real quad precision numbers"""
1709+ x = QuadPrecision (value )
1710+ result = func (x )
1711+
1712+ # For NaN, use special comparison
1713+ if np .isnan (value ):
1714+ assert np .isnan (float (result ))
1715+ else :
1716+ assert result == x
1717+
You can’t perform that action at this time.
0 commit comments