Questions in category: Bug (Bug)
软件 >> Calculator >> Bug [57]
<[1] [2] [3] [4] [5] [6] >

51. [Bug] 多项式乘法中的错误

Posted by haifeng on 2023-02-10 07:56:28 last update 2024-03-31 10:50:49 | Answers (0) | 收藏


>> :mode=polyn
Switch into polynomial mode.

 

>> 51*(302+8x)+24*(-604-17x)
in> 51*(302+8x)+24*(-604-17x)

out> -14088*x^1 is NOT a polynomial of x

 

>> 51*(8x+302)+24*(-17x-604)
in> 51*(8x+302)+24*(-17x-604)

out> 906

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

 

>> 8x+302-17x-604
in> 8x+302-17x-604

out> 8x+302-17x-604

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


>> 1*(8x+302-17x-604)
in> 1*(8x+302-17x-604)

out> 293x^1-604

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


已经修复.  

Date: 2023-02-11


v0.576

Date: 2023-10-08

>> :mode polyn
Switch into polynomial mode.

>>  51*(302+8x)+24*(-604-17x)
in> 51*(302+8x)+24*(-604-17x)

out> 0|1x^1+906|1
------------------------


还是有问题

>> :mode polyn
Switch into polynomial mode.

>> -1*(8x+302-17x-604)
in> -1*(8x+302-17x-604)

out> -9x^1-302
------------------------


>> -8x
in> -8x

out>

已经在 ver0.592中解决

>> :mode polyn
Switch into polynomial mode.

>> -8x
in> -8x

out> -8x^1
------------------------


>> -1*(x-2)
in> -1*(x-2)

out> -1x^1+2
------------------------


>> -1*(8x+302-17x-604)
in> -1*(8x+302-17x-604)

out> 9x^1+302
------------------------

52. [Bug]

Posted by haifeng on 2023-02-05 21:32:42 last update 2023-02-05 21:34:15 | Answers (0) | 收藏


>> printRecursiveSeries((x+1)x(x+2),x,1,10,\n)
in> printRecursiveSeries((x+1)x(x+2),x,1,10,\n)
1
3
5
7
9
11
13
15
17
19

 

不同于下面的 (x+1)*x*(x+2)
------------------------

>> printRecursiveSeries((x+1)*x*(x+2),x,1,10,\n)
in> printRecursiveSeries((x+1)*x*(x+2),x,1,10,\n)
1
6
336
38272416
56060590716839257663296
176186654453940966415101758343368831005891099500239113100063334235776
5469139827058218798101218465260906817770532009979290887174189373402102848480157704494601835787106557175334209323000899768994221877279015724289748216104673490320217281562508981513548171796332733064696806656


 

>> printRecursiveSeries(x(x+1)(x+2),x,1,10,\n)
in> printRecursiveSeries(x(x+1)*(x+2),x,1,10,\n)
1
6
56
3306
10939556
119673918295806
14321846720271609085072077056

 

53. [Bug] 分数模式下的运算Bug

Posted by haifeng on 2023-01-30 13:54:48 last update 2023-01-30 13:54:48 | Answers (0) | 收藏


>> 25^(-2)+35^(-2)+75^(-2)+100^(-2)+175^(-2)
in> 25^(-2)+35^(-2)+75^(-2)+100^(-2)+175^(-2)

out> (175*100*75*35*^2*^2*^2*^2+175*100*75*25*^2*^2*^2*^2+175*100*875*^2*^2*^2*^2+175*75*875*^2*^2*^2*^2+100*75*875*^2*^2*^2*^2)|175*100*75*875*^2*^2*^2*^2*^2

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

54. [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] 李炯生、查建国  编著  《线性代数》

55. [BUG] Calculator 计算一元不定方程时的BUG

Posted by haifeng on 2022-12-07 10:04:57 last update 2022-12-07 10:04:57 | Answers (0) | 收藏


Solve the indefinite equation :
5*X1+8*X2 = 7

u1=7-2*u0
---------------
X1 = -1*u1+u0
X2 = -1*u0+u1
X1 = -1*X2+u0

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

56. [Bug] Calculator 矩阵输入 Bug

Posted by haifeng on 2022-09-30 20:46:35 last update 2022-09-30 23:23:08 | Answers (0) | 收藏


B=[3 21 27/4;
1 -1 0;
-8 -2 37/4]

输入该矩阵, 出现 Bug.


>> B=[3 21 27/4;
B=[3 21 27/4;
1 -1 0;
-8 -2 37/4]
input> [3,21,27/4;1-1,0;-8,-2,37/4]
det(B)=0
----------------------------
 type: matrix
 name: B
value:
3       21      27/4
1-1     0       0
-8      -2      37/4

determinant: 0
--------------------


已经修复

>> B=[3 21 27/4;
B=[3 21 27/4;
1 -1 0;
-8 -2 37/4]
input> [3,21,27/4;1,-1,0;-8,-2,37/4]
det(B)=-289.50
----------------------------
 type: matrix
 name: B
value:
3       21      27/4
1       -1      0
-8      -2      37/4

determinant: -289.50
--------------------

 

57. [Bug] calculator.exe 输入矩阵时的问题

Posted by haifeng on 2022-09-05 07:59:25 last update 2022-09-15 08:23:22 | Answers (0) | 收藏


当在 [ 后有空格或者; 后有空格等情况, parser 自动插入了多余的逗号.

>> A=[ 1 2; 3 4 ]
input> [,1,2;,3,4,],;

 


经过不断完善, 现在的输入规则是这样的.

calculator.exe

>> A=[ 1,2 3; 4 5, 7
A=[ 1,2 3; 4 5, 7
; 2 3]
input> [1,2,3;4,5,7;2,3]
det(A)=13
----------------------------
 type: matrix
 name: A
value:
1       2       3
4       5       7
2       3       0

determinant: 13
--------------------


CalculatorApp.exe

输入

A=[ 1,2 3; 4 5, 7
; 2 3]

输出

[var] A
1 2 3 
4 5 7 
2 3 0 
input> [1,2,3;4,5,7;2,3]
det(A)=13
--------------------
>> 


:version 

0.518

 

<[1] [2] [3] [4] [5] [6] >