问题

软件 >> Calculator >> Bug
Questions in category: Bug (Bug).

[Bug] 多项式计算时遇到的问题

Posted by haifeng on 2023-01-27 09:49:59 last update 2023-01-27 12:39:20 | Answers (0) | 收藏


>> :mode=polyn
Switch into polynomial mode.

>> (x^4+3x^3-x^2-4x-3)/(3x^3+10x^2+2x-3)
in> (x^4+3x^3-x^2-4x-3)/(3x^3+10x^2+2x-3)

out> 没有反应

 


已解决. 问题是其中的系数采用了数值计算, 1 除以 3 得 0.33333333, 这样导致无穷循环.

下面是采用分数运算后运行所得.

>>  (x^4+3x^3-x^2-4x-3)/(3x^3+10x^2+2x-3)
in> (x^4+3x^3-x^2-4x-3)/(3x^3+10x^2+2x-3)

out>
 quotient> q(x) = 1|3x^1-1|9
remainder> r(x) = -5|9x^2-25|9x^1-10|3

1|3x^1-1|9

------------------------

 


Remark:

这个例子见于 [1]  P. 12.

 

References:

[1] 李炯生、查建国  编著  《线性代数》