
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
a calculator module for Python and Rust capable of computing arbitrarily long equations and functions.
These tests were done using hyperfine and the speed-test.sh script in the test folder
testing python version:
Benchmark 1: python -c "import calculator as calc; calc.solve_func(\"f(x)= 4+3x+x**2+x**3\", -1000, 1000)"
Time (mean ± σ): 1.150 s ± 0.018 s [User: 1.130 s, System: 0.016 s]
Range (min … max): 1.126 s … 1.231 s 50 runs
testing rust version:
Benchmark 1: python -c "import calculators as calc; calc.solve_func(\"f(x)= 4+3x+x^2+x^3\", -1000, 1000)"
Time (mean ± σ): 11.8 ms ± 0.8 ms [User: 10.6 ms, System: 3.6 ms]
Range (min … max): 11.1 ms … 14.5 ms 25 runs
As you can see the rust version is significantly faster.
there are three functions that this libray exposes:
Function | Args | Description |
---|---|---|
solve | equasions: list(str) | takes a list of equations as strings and solves eatch one returning a list of answers. |
solve_func | f: str, start: int, stop: int | solves the function, f, at all integer points between start and stop. |
solve_funcs | fs: list(str), start: int, stop: int | solves a list of functions, fs, for all integer points between start and stop. returns a dictionary whose keys are function names and whose values are a tuple of a list of x values and a list of y values. |
with pip:
pip install calc-rs
FAQs
Unknown package
We found that calc-rs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.