我正在研究算法。提到算法的应用之一是符号数学。我从字典中找到了如下定义。
The use of computers to manipulate mathematical equations and expressions in symbolic form, as opposed to manipulating the numerical quantities represented by those symbols. Such a system might be used for symbolic integration or differentiation, substitution of one expression into another, simplification of an expression, change of subject etc. One of the best known symbolic mathematics software packages is Mathematica.
我的问题是什么陈述“符号形式的方程式和表达式,而不是操纵这些符号表示的数值”。意思是?
谢谢!
最佳答案
My question what does statement "equations and expressions in symbolic form, as opposed to manipulating the numerical quantities represented by those symbols." mean?
第二个,像这样的意思是:
>>> x = 2.3
>>> y = 9.8
>>> z = x+2*y
>>> z
21.900000000000002
>>> type(z)
<type 'float'>
您将 x
、y
和 z
视为数字名称的位置。您正在将计算机用作老式计算器,它只做算术运算。 z = x+2*y
执行右侧描述的算术运算并将结果数字关联到 z
。
通过“符号形式”,更像这样的意思是:
sage: x, y, z = var("x y z")
sage: z == x+2*y
z == x + 2*y
sage: eq = z == x+2*y
sage: eq
z == x + 2*y
sage: type(z)
<type 'sage.symbolic.expression.Expression'>
sage: parent(eq)
Symbolic Ring
sage: eq.solve(y)
[y == -1/2*x + 1/2*z]
其中 x
、y
和 z
可以是表达式或某些结构中的变量,而不仅仅是特定数字的名称,并且可以执行更高级别的操作。
关于algorithm - 算法中的符号数学,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12196080/