Questions in category: 开发计划 (DevPlan)
软件 >> Calculator >> 开发计划
<[1] [2] [3] >

1. [DevPlan] 增加了 ispolyn() 函数

Posted by haifeng on 2023-10-09 10:02:15 last update 2023-10-09 11:13:31 | Answers (0) | 收藏


增加了 ispolyn() 函数, 用于判断是否是多项式. 不过目前这个函数的功能比较弱. 建议输入多项式按照规则输入.

>> ispolyn(3+x^-3)
3
x^-3
It is a polynomial.
>> ispolyn(3^(9+2)x^3)
3^(9
2)x^3
It is a polynomial.
>> ispolyn(3^11x^3)
3^11x^3
It is a polynomial.
>>

 

上述问题已经解决

>> ispolyn(3*(9+2)x^-5)
33x^-5
It is a polynomial.
>> ispolyn(3*(9+2)x^(3+3))
33x^6
It is a polynomial.
>> ispolyn(3*(9+2)x^(3+2))
33x^5
It is a polynomial.

 

2. [DevPlan] 将中途计算结果保存

Posted by haifeng on 2023-09-23 19:59:45 last update 2023-09-23 19:59:45 | Answers (0) | 收藏


例如, 列出 1000 以内的所有素数, 并存储到矩阵 A 中, 这里 A 是 1000x1 类型的矩阵.

3. [DevPlan] 级数敛散性判定以及求和.

Posted by haifeng on 2023-04-27 18:21:58 last update 2023-04-27 18:27:44 | Answers (0) | 收藏


例如, 调和级数 $\sum_{n=1}^{\infty}\frac{1}{n}$ 是发散的.

输入 sum(1/n,n,1,inf) 应输出 inf

若可能, 也可以输出如何判定发散的过程.

 

4. 关于复数的计算

Posted by haifeng on 2023-04-25 20:56:26 last update 2023-04-26 21:12:36 | Answers (0) | 收藏


目前(v.0.551)在numerical模式下, 输入下面的式子也能计算. 如果再给定相关的约束, 例如 i^2=-1, 则可以将结果简化.

>> (3+i)*(2-i)
in> (3+i)*(2-i)

out> -i*i+2*i-3*i+6
------------------------


>> (3+2i)*(2-i)
in> (3+2i)*(2-i)

out> -2*i*i+2*2*i-3*i+6
------------------------

当然也可以引入 Complex 类, 专门处理复数的运算. 不过, 需要引入 complex 模式.

:mode complex

进入复数计算模式, 此时 i 被指定为 sqrt(-1).

 

例子

>> (2+3i)*(3-4i)
in> (2+3i)*(3-4i)

out> -3*i*4*i+3*3*i-2*4*i+6
------------------------


>> -3*i*4*i+3*3*i-2*4*i+6
in> -3*i*4*i+3*3*i-2*4*i+6

out> -4*3*i*i+9*i-8*i+6
------------------------


>> -4*3*i*i+9*i-8*i+6
in> -4*3*i*i+9*i-8*i+6

out> -12*i*i+9*i-8*i+6
------------------------


>> -12*i*i+9*i-8*i+6
in> -12*i*i+9*i-8*i+6

out> -12*i*i+9*i-8*i+6
------------------------

 

5. [DevPlan] 多项式反序输出

Posted by haifeng on 2023-04-22 10:13:55 last update 2023-04-22 10:13:55 | Answers (0) | 收藏


类似于

in> reverse(1908)
out> 8091

对于多项式  ax^n+bx^{n-1}+...+fx+g=0, 使用 reverse() 函数进行逆向输出.

6. [DevPlan]幂运算待完善

Posted by haifeng on 2023-04-09 17:00:22 last update 2023-04-09 17:00:22 | Answers (0) | 收藏


>> (1/2)^(2/3)
in> (1/2)^(2/3)

out> sqrtn(1,3)|sqrtn(4,3)

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


>> (a/b)^(2/3)
in> (a/b)^(2/3)

out>
------------------------

7. [DevPlan] MATH AI

Posted by haifeng on 2023-03-25 08:15:11 last update 2023-03-25 08:15:11 | Answers (0) | 收藏


将 MATH system 中的数据作为数学语料库, 供 Calculator 调用.

8. [DevPlan] 多项式中的运算

Posted by haifeng on 2023-03-24 21:49:46 last update 2023-04-27 18:19:35 | Answers (0) | 收藏


>> (1|3x^1-1|9)*(3x^3+10x^2+2x-3)+( -5|9x^2-25|9x^1-10|3)
in> (1|3x^1-1|9)*(3x^3+10x^2+2x-3)+(-5|9x^2-25|9x^1-10|3)

out> x^4+10|3-1|3x^3+2|3-10|9-5|9x^2-2|9-25|9-1x^1+1|3-10|3
------------------------

 

有待解决


在 v0.551中已经解决.

 

>> :mode polyn
Switch into polynomial mode.

>>  (1|3x^1-1|9)*(3x^3+10x^2+2x-3)+( -5|9x^2-25|9x^1-10|3)
in> (1|3x^1-1|9)*(3x^3+10x^2+2x-3)+(-5|9x^2-25|9x^1-10|3)

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

 

9. [DevPlan] Calculator 中模式的改进

Posted by haifeng on 2023-03-24 14:53:27 last update 2023-03-24 14:59:43 | Answers (0) | 收藏


最初的计算模式有两种, numerical 和 fraction, 分别对应值为 0 和 1.

后来在 v0.528 版本中加入了 polyn 模式. 令calculatingMode的值为 2.

但是在多项式计算中, 需要确定是 numerical 还是 fraction 计算模式, 因此 polyn 模式应独立于 numerical 和 fraction.

例如, polyn 和 numerical 模式下, 设置 calculatingMode =10 (此时是二进制)   

polyn 和 fraction 模式下, 设置 calculatingMode = 11 (二进制)


假定 calculatingMode 是一个 int,

7 6 5 4 3 2 1 0
            x x
            0: 
1: polyn

0: numerical
1: fraction

 

最后一位 x=0 时代表 numerical, x=1 代表 fraction;

 

10. [DevPlan] 多项式输入的改进.

Posted by haifeng on 2023-03-18 12:50:56 last update 2023-03-18 12:50:56 | Answers (0) | 收藏


实现如问题2877中 $\arctan x$ 的前 $n$ 项乘法.

目前 Calculator 在读取多项式时, 无法处理 $x-x^3/3+x^5/5$ 等输入.

实现后, 进一步改进的地方是理解省略号, 如果输入中有三个., 则应从前几项判断出系数的公式. 

<[1] [2] [3] >