test_libstandard.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:femtocode 作者: diana-hep 项目源码 文件源码
def test_asinh(self):
        self.assertEqual(session.source("Test", x=real(3.14, 6.5)).type("asinh(x)"), real(math.asinh(3.14), math.asinh(6.5)))
        self.assertEqual(session.source("Test", x=real(3.14, almost(6.5))).type("asinh(x)"), real(math.asinh(3.14), almost(math.asinh(6.5))))
        self.assertEqual(session.source("Test", x=real(3.14, inf)).type("asinh(x)"), real(math.asinh(3.14), inf))
        self.assertEqual(session.source("Test", x=real(3.14, almost(inf))).type("asinh(x)"), real(math.asinh(3.14), almost(inf)))
        self.assertEqual(session.source("Test", x=real).type("asinh(x)"), real)
        self.assertEqual(session.source("Test", x=extended).type("asinh(x)"), extended)
        for entry in numerical.toPython(y = "y", a = "asinh(y)").submit():
            self.assertEqual(entry.a, math.asinh(entry.y))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号