Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

TBFLib-1.2-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

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

Hashes for TBFLib-1.2.tar.gz
Algorithm Hash digest
SHA256 6d723dea6f64e0ca0dec1d1a823c9a9f71586a2c2613aa3af3798b41de2ea951
MD5 8c6c467334008945b73b1bda47151c0a
BLAKE2b-256 4039de13c8aa0b07a91f3ce70e8869368dd8017f068310ff4265d461062681ce

See more details on using hashes here.

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

Hashes for TBFLib-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fac4b76d239af788e7a7cd88891797d29291f26c1ee7769ffdb6cd26921cb688
MD5 2db3ed566583c8841b8ca81d72992142
BLAKE2b-256 4973cc285277d4e9d3fbbc7256aae40e681b1ed9046b85826fb6e825720b4870

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page