That's Formula module for python.
Project description
ToriBird's Formula library (TBFLib)
This is ToriBird's Formula Library. You can use formula with limit, and Case-wise formulas.
how to use
- Normal Formula -> TBFLib.Formula("Your formula:str","Args in your formula:str")
- Limit -> TBFLib.Limit("min:number","value:str",max:number,"n(This means "<") or e(This means "<="):str","n or e")
- Limited Formula -> TBFLib.LimitedFormula("Your formula:Formula","Formula's Limit:Limit")
- Formulas -> TBFLib.Formulas("Formula","Formula"........)
Sample
f = TBFLib.Formula("x**2 + 4 * x + 4", "x")
print(f.calc(4))
limit1 = TBFLib.Limit(2, "x", 10)
print(limit1.check("x", 1))
g = TBFLib.LimitedFormula(f, TBFLib.Limit(2, "x", 5))
print(g.calc(4))
fs = TBFLib.Formulas(f, g)
print(fs.calc(10))
>>>36
>>>False
>>>36
>>>144
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
TBFLib-1.1.tar.gz
(7.4 kB
view hashes)
Built Distribution
TBFLib-1.1-py3-none-any.whl
(10.6 kB
view hashes)