示例#1
0
文件: test.py 项目: bluescarni/audi
    def test_abs(self):
        from pyaudi import gdual_double as gdual
        from pyaudi import abs as gd_abs

        x = gdual(1.1, "x", 6)
        y = gdual(1.2, "y", 6)

        self.assertEqual(x + y, gd_abs(x + y))
        self.assertEqual(-(x + y), -gd_abs(x + y))
示例#2
0
文件: test.py 项目: darioizzo/audi
    def test_abs(self):
        from pyaudi import gdual_double as gdual
        from pyaudi import abs as gd_abs

        x = gdual(1.1, "x",6);
        y = gdual(1.2, "y",6);

        self.assertEqual(x+y, gd_abs(x+y))
        self.assertEqual(-(x + y), - gd_abs(x+y))