I'm trying to understand some of the basics of using POSIX pthreads. The kind of thing I need to do (eventually) is parallelize some computations, using a thread pool model. At present I want to ensure I have a very basic sense for how the POSIX pthread model works. So I'm trying to create the simplest thread pool that's general enough to do the kinds of things I want to do. There will be some shared memory, an input queue, …
给定一个 sympy 符号函数,例如
x=symbols("x")
h=sin(x)
Run Code Online (Sandbox Code Playgroud)
当一个人打电话
h.subs(x, mpf('1.0000000000000000000000000000000000000000000001'))
Run Code Online (Sandbox Code Playgroud)
sympy 返回一个浮点数。返回值不是 mpf。
是否有一种方便的方法可以让 sympy 使用任意精度来评估符号标准函数(如指数和三角函数)?