Skip to main content

A program that provides a GUI and a CLI to a symbolic computation and computer algebra system python library, SymPy.

Project description

Build Status

CASPy

A program that provides a GUI and a CLI to SymPy, a symbolic computation and computer algebra system Python library.

CASPY logo

CASpy

A Computer Algebra System built using mainly PyQt5 and Sympy

Installing

Install with pip .

pip install caspy3

Usage

To start the GUI

caspy start

Requirements

Make sure you install all dependencies inside requirements.txt.

Command-line tool

Notes: Put any negative numbers inside parentheses so the command line tool doesn't think it's an argument. Example: caspy eval (-1)**2

Usage: caspy [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  deriv  Calculate the derivative.
  eq     Solve an equation.
  eval   Evaluates an expression.
  exp    Expandes an expression.
  integ  Calculate the integral.
  limit  Calculate the limit of an expression.
  pf     Retreives the prime factors of an positive integer.
  simp   Simplifies an expression.
  start  Start the GUI
  web    Choose a number from a list of usable maths websites.

Flags

-p, --preview, Preview instead of calculating
-o, --output-type, Select output type, 1 for pretty; 2 for latex and 3 for normal
-u, --use-unicode, Use unicode for symbols
-l, --line-wrap, Use line wrap on answer

Arguments

-s, --use-scientific, Notate approximate answer with scientific notation, argument is accuracy
-a --accuracy, Accuracy of evaluation

deriv

Calculate the derivative.

  Usage:
    deriv *expression *variable order at_point
    * = required
  Example:
    > caspy deriv sin(1/ok) ok 3 pi

eq

Solve an equation.

  Usage:
    eq *left_expression *right_expression *variable_to_solve_for solve_type
    * = required
    Use '--solve-type' or '-st' flag to solve equation with SymPy solve, set flag for solveset
  Examples:
    > caspy eq x**x 2 x
    > caspy eq sin(x) 1 x -st

eval

Evaluates an expression.

  Usage:
    eval *expression
    * = required
  Example:
    > caspy eval exp(pi)+3/sin(6)

exp

  Expandes an expression.

  Usage:
    exp *expression
    * = required
  Example:
    > exp (a+b-c)**3

integ

Calculate the integral.

  Usage:
    integ *expression *variable lower_bound upper_bound
    * = required
  Example:
    > caspy integ 1/sqrt(1-x**2) x (-1) 1

limit

Calculate the limit of an expression.

  Usage:
    limit *expression *variable *as_variable_is_approaching side
    * = required
    Both sides as default, + for right side and - for left side
  Example:
    > caspy limit u!**(1/u) u 0 -

pf

Retreives the prime factors of an positive integer.

  Usage:
    pf *number
    * = required
  Example:
    > caspy pf 372

  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)'

simp

Simplifies an expression.

  Usage:
    simp *expression
    * = required
  Example:
    > caspy simp sin(x)**2+cos(x)**2

start

Start the GUI

web

Choose a number from a list of usable maths websites. type '-l' for a list of websites and enter a number. The website will be opened in the default browser.

  Usage:
    web number
  Example:
    > caspy web 4
    > caspy web -l

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

CASPy3-1.2.1.tar.gz (328.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

CASPy3-1.2.1-py3-none-any.whl (915.4 kB view details)

Uploaded Python 3

File details

Details for the file CASPy3-1.2.1.tar.gz.

File metadata

  • Download URL: CASPy3-1.2.1.tar.gz
  • Upload date:
  • Size: 328.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6

File hashes

Hashes for CASPy3-1.2.1.tar.gz
Algorithm Hash digest
SHA256 7a3ab1e51dbc83181c2d9fc36df21f26c2bb11d29a5812258c03f890cfa3286b
MD5 c8b03a82d5c9a596ef45b9bd988669aa
BLAKE2b-256 621f6b025098b173c0cd8786d694f93d4d3a19f0a4a499c64809c1fbe1b3f5b8

See more details on using hashes here.

File details

Details for the file CASPy3-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: CASPy3-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 915.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6

File hashes

Hashes for CASPy3-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e16a80ef508f15cdc11e99e9535977570f407d0cf06c1357e7b2bdefb4264ec3
MD5 bd76632899abed38dbe819d5bddc5bf8
BLAKE2b-256 3d2291789f62bf762efcf7ac266f156fd812609389235aecdff1631f29013722

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page