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.
Link : https://pypi.org/project/TBFLib/
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))
f.getformula()
limit1.getlimit()
fs.getargs()
>>>36
>>>False
>>>36
>>>144
>>>x**2 + 4 * x + 4
>>>2<=x<=10
>>>"x"
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.2.tar.gz
(7.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
TBFLib-1.2-py3-none-any.whl
(10.9 kB
view details)
File details
Details for the file TBFLib-1.2.tar.gz.
File metadata
- Download URL: TBFLib-1.2.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d723dea6f64e0ca0dec1d1a823c9a9f71586a2c2613aa3af3798b41de2ea951
|
|
| MD5 |
8c6c467334008945b73b1bda47151c0a
|
|
| BLAKE2b-256 |
4039de13c8aa0b07a91f3ce70e8869368dd8017f068310ff4265d461062681ce
|
File details
Details for the file TBFLib-1.2-py3-none-any.whl.
File metadata
- Download URL: TBFLib-1.2-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fac4b76d239af788e7a7cd88891797d29291f26c1ee7769ffdb6cd26921cb688
|
|
| MD5 |
2db3ed566583c8841b8ca81d72992142
|
|
| BLAKE2b-256 |
4973cc285277d4e9d3fbbc7256aae40e681b1ed9046b85826fb6e825720b4870
|