Skip to content

Dhaiven/BetterMaths

Repository files navigation

BeterMaths Banner

MIT License

Warning

This module is in beta phase

Little documentation (for v0.0.5)

This module add Expression class that allow resolve expression in string

# Create an expression
expression = Expression("2+7*8cos(3)")
# Resolve this expression
expression.result() # 57.92325394625613

Why use Expression and not eval ?

  • Expression is faster than eval (See tests/main.py)
  • Expression support parenthese, mathematical formulas like cos and magics numbers like π

See the Wiki for more documentations

Installation

Open your terminal and put pip install BetterMaths
For upgrade the version, put pip install --upgrade BetterMaths

Contribution

BetterMaths accepts community contributions!
This contributions must case no error tests folder. Launch init file, put y for take your changes and checks if there are error.

Authors