[![Build Status](https://travis-ci.org/joemccann/dillinger.svg?branch=master)](https://travis-ci.org/joemccann/dillinger)
# CASPy
_A program that provides a GUI and a CLI to SymPy, a symbolic computation and computer algebra system Python library._
<p align="center">
<img src="https://i.imgur.com/F7wfzQt.png" alt="CASPY logo">
</p>
## Installing
Install with `pip`.
```
pip install caspy3
```
## Usage
To start the GUI
```
caspy start
```
### Command-line tool
```
Usage: caspy [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
deriv Derive a function Usage: caspy deriv EXPRESSION VARIABLE [ORDER]...
diff-eq Solves a differential equation equation.
eq Solves a normal equation.
eval Evaluates an expression.
exp Expandes an expression.
integ Calculate definite and indefinite integrals of expressions.
limit Calculate the limit of an expression.
pf Retreives the prime factors of an positive integer.
simp Simplifies an expression.
start Start the GUI
sys-eq Solves a system of equations.
web Choose a number from a list of usable maths websites and open it...
```
#### Flags
`-p, --preview`, Previews instead of calculating <br>
`-o, --output-type`, Select output type, 1 for pretty; 2 for latex and 3 for normal <br>
`-u, --use-unicode`, Use unicode for symbols <br>
`-l, --line-wrap`, Use line wrap on answer <br>
#### Arguments
`-s, --use-scientific`, Notate approximate answer with scientific notation, argument is accuracy <br>
`-a --accuracy`, Accuracy of evaluation <br>
`-c --copy`, Copies the answer. 1 for exact_ans and 2 for approx_ans and 3 for a list of [exact_ans, approx_ans] <br>
#### Equation specific arguments
`-d --domain`, Give domain to solve for <br>
`-v --verify-domain`, Filter out any solutions that isn't in domain. Doesn't work with solveset. This flag must be set in order for domain to work if it solves with solve and not solveset. Needed for system of equations <br>
#### deriv
```
Derive a function
Usage: caspy deriv EXPRESSION VARIABLE [ORDER] [AT_POINT]
Example(s):
>>> caspy deriv x**x x
>>> caspy deriv sin(1/x) x 3 pi
```
#### eq
```
Solves a normal equation.
Separate equation by either a space or a =, but not both.
Usage: eq LEFT_EXPRESSION RIGHT_EXPRESSION VARIABLE_TO_SOLVE_FOR [SOLVE_TYPE]
Example(s):
>>> caspy eq x**x 2 x
>>> caspy eq sin(x)=1 x -st
```
#### diff-eq
```
Solves a differential equation equation.
Separate equation by either a space or a =, but not both.
Usage: diff-eq LEFT_EXPRESSION RIGHT_EXPRESSION FUNCTION_TO_SOLVE_FOR [HINT]
Example(s):
>>> caspy diff-eq f'(x) 1/f(x) f(x)
>>> caspy diff-eq f''(x)+3*f'(x)=x**2 f(x)
```
#### sys-eq
```
Solves a system of equations.
Takes number of equations as argument, then will prompt user for all equations
Usage: sys-eq NO_OF_EQUATIONS
Example(s):
>>> caspy sys-eq 5
>>> caspy sys-eq 3 -d Integers
```
#### eval
```
Evaluates an expression.
After expression you can also subtitute your variables with a value.
To substitute, simply type the variable to substitute followed by the value separated by a space.
For example:
>>> 3**(x+y) x 3 y 5
=> 3**((3)+(5))
=> 6561
Usage: eval EXPRESSION [VARS_SUB ... ]
Example(s):
>>> caspy eval exp(pi)+3/sin(6)
>>> caspy eval 3**x x 3
```
#### exp
```
Expandes an expression.
Usage: exp EXPRESSION
Example(s):
>>> caspy exp (a+b-c)**3
```
#### integ
```
Calculate definite and indefinite integrals of expressions.
Usage: caspy integ EXPRESSION VARIABLE {LOWER_BOUND UPPER_BOUND} [APPROXIMATE]
Example(s):
>>> caspy integ 1/sqrt(1-x**2) x -1 1
>>> caspy integ x**x x -1 1 -A
```
#### limit
```
Calculate the limit of an expression.
Usage: caspy limit EXPRESSION VARIABLE AS_VARIABLE_IS_APPROACHING [SIDE]
Example(s):
>>> caspy limit (1+1/(a*n))**(b*n) n oo
>>> caspy limit n!**(1/n) n 0 -
```
#### pf
```
Retreives the prime factors of an positive integer.
Note: exact_ans stores factors as dict: '{2: 2, 3: 1, 31: 1}'
while approx_ans stores factors as string: '(2**2)*(3**1)*(31**1)'
Usage: pf NUMBER
Example(s):
>>> caspy pf 372
```
#### simp
```
Simplifies an expression.
Usage: simp EXPRESSION
Example(s):
>>> caspy simp sin(x)**2+cos(x)**2
```
#### start
```
Start the GUI. No options/flags etc
```
#### web
```
Choose a number from a list of usable maths websites and open it in default web browser.
type '-l' for a list of websites and enter a number. The website will be opened in the default browser.
Usage: web {NUMBER | LIST}
Example(s):
>>> caspy web 4
>>> caspy web -l
```
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共151个文件
py:59个
pyc:49个
ui:17个
资源分类:Python库 所属语言:Python 资源全名:CASPy3-2.0.0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
Python库 | CASPy3-2.0.0.tar.gz (151个子文件)
setup.cfg 42B
.gitignore 397B
logo.ico 111KB
MANIFEST.in 53B
formulas.json 3KB
settings.json 890B
websites.json 740B
LICENSE 32KB
README.md 5KB
CHANGELOG.md 3KB
PKG-INFO 7KB
PKG-INFO 7KB
logo.png 260KB
923x914.png 260KB
256x256.png 34KB
64x64.png 3KB
48x48.png 2KB
32x32.png 2KB
24x24.png 1KB
16x16.png 807B
worker.py 50KB
cli.py 20KB
shell.py 13KB
calc_system_eq.py 12KB
main.py 11KB
formulas.py 11KB
equations.py 11KB
calc_formula.py 9KB
calc_integ.py 8KB
syntax_pars.py 8KB
calc_normal_eq.py 7KB
calc_diff_eq.py 6KB
calc_deriv.py 6KB
paren_highlight.py 6KB
prev_formula.py 6KB
prev_diff_eq.py 6KB
calc_limit.py 5KB
derivative.py 5KB
integral.py 5KB
prev_system_eq.py 4KB
prev_limit.py 4KB
prev_integ.py 4KB
prev_normal_eq.py 4KB
prev_deriv.py 4KB
limit.py 4KB
eval_exp.py 4KB
base_tester.py 4KB
test_all.py 4KB
evaluate.py 3KB
web.py 3KB
prev_eval_exp.py 3KB
expand_exp.py 3KB
scientific_notation.py 3KB
simplify.py 3KB
expand.py 3KB
prev_simp_exp.py 2KB
prev_expand_exp.py 2KB
simp_exp.py 2KB
tab_list.py 2KB
pf.py 2KB
tester_template_creator.py 2KB
parse_diff_text.py 2KB
calc_pf.py 1KB
parse_var_sub.py 1KB
setup.py 1KB
dialog_view.py 1KB
dialog_remove_website.py 1KB
execute_code.py 1KB
start_code_dialog.py 1KB
dialog_add_website.py 1010B
__init__.py 926B
thread_running.py 648B
dialog_view_text.py 577B
qt_gui.py 518B
__init__.py 92B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
worker.cpython-37.pyc 30KB
worker.cpython-38.pyc 26KB
cli.cpython-37.pyc 16KB
shell.cpython-38.pyc 11KB
shell.cpython-37.pyc 11KB
formulas.cpython-38.pyc 10KB
formulas.cpython-37.pyc 10KB
main.cpython-37.pyc 10KB
equations.cpython-38.pyc 9KB
main.cpython-38.pyc 9KB
equations.cpython-37.pyc 9KB
syntax_pars.cpython-38.pyc 6KB
syntax_pars.cpython-37.pyc 6KB
paren_highlight.cpython-37.pyc 5KB
paren_highlight.cpython-38.pyc 5KB
integral.cpython-38.pyc 4KB
integral.cpython-37.pyc 4KB
derivative.cpython-38.pyc 4KB
derivative.cpython-37.pyc 4KB
limit.cpython-38.pyc 3KB
limit.cpython-37.pyc 3KB
共 151 条
- 1
- 2
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功