Metadata-Version: 2.1
Name: pymep
Version: 1.0.2
Summary: Python Math Expression Parser
Home-page: https://github.com/sbesada/MathParserLibrary
Author: Sergio Besada
Author-email: sergio.besada@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown

python math expression parser is a python project where you can parse or evaluate math expressions.

This algorithm does not use a decision tree. It is a recursive algorithm.

Installation

pip install pymep

Here you can see some examples:

  Real Numbers:    

	from pymep.realParser import parse
	from pymep.realParser import eval


	#Real Expresion parser
	fx="cos(10)"
	print(parse(fx))
	xi=5
	fx = "1 + x"
	print(eval(fx, xi))


  For complex Numbers:

    from pymep.complexParser import parse
	from pymep.complexParser import eval
	from pymep.complex import Complex

	#Operation with complex numbers
	a = Complex(1,2)
	print(a.__radd__(10).__complex__())
	print(Complex.radd(10, a).__complex__())


	#Complex Expresion parser
	fx="cos(10+2j)"
	print(parse(fx).__complex__())
	xi=5
	fx = "1 +j+x"
	print(eval(fx, xi).__complex__())


 There is a full list of examples inside!!

Enjoy it!!


NOTE: Regarding to the OS where you excute the tests, it is possible that some tests fail due to rounding issues. The mathematical library used in this project is "math". In the future, it is possible that the math library change.  


