Skip to content

Symbolic manipulation of mathematical expressions

License

Notifications You must be signed in to change notification settings

LordDarkula/polypy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

polypy

Symbolic manipulation of mathematical expressions

License

polypy is available under the MIT license. See the LICENSE file for more info. Copyright © 2016 Aubhro Sengupta. All rights reserved.

Introduction

Polypy is a libbrary designed to store mathematical expressions symbolically, so they can be stored and evaluated as functions at any time. It is designed to look and feel like real mathematical notation as much as possible.

Usage

from polypy.base import x

To create basic functions

# Simple linear function
>>> f = 2*x
>>> f(3)
6

# Quadratic function
>>> f = 3*x**2 + 2*x + 3
>>> f(1)
8

Simple functions can be chained together to create more complex functions.

# g = 2^2^x
>>> g = 2**2**x
>>> f = x + 3

# h = 2^2^x + 3
>>> h = f(g)

Releases

No releases published

Packages

No packages published

Languages