Skip to main content

Tools for calculations

Project description

sort(arr: List[Any], key: Callable[[Any], Any] = lambda x: x, reverse: bool = False)

内省排序Introsort,结合了多种排序算法的优点,以确保在各种情况下都能获得高效的性能,不返回列表。arr,待排序的列表。key,用于比较的键函数,自定义排序规则,而不必修改原始数据。reverse,是否降序排列,默认为升序。

Introsort, which combines the advantages of multiple sorting algorithms to ensure efficient performance in all cases. Does not return a list. arr is the list to be sorted. key is a function to extract a comparison key from each element, allowing custom sorting without modifying the original data. reverse specifies whether to sort in descending order (default is ascending).

log(n, m, precision=50)

精确计算以m为底n的对数,参照math.log()参数顺序。默认保留50位小数,若计算结果非常接近整数,函数会返回四舍五入后的整数结果。m为对数的底数(int/float/Decimal类型),n为真数(int/float/Decimal类型),precision为可选的计算精度参数(整数类型,默认50位小数)。

Accurately calculate the logarithm of n with base m. Follow the parameter order of math.log(). The result retains 50 decimal places by default. If the calculation result is very close to an integer, the function will return the rounded integer value. m is the base of the logarithm (of type int/float/Decimal), n is the argument (of type int/float/Decimal), and precision is an optional calculation precision parameter (integer type, defaulting to 50 decimal places).

LaTeX(LaTeX_string: str)

目前支持功能 Currently supported functions

i, j, \times, \div, \frac, \cfrac, \log, \sqrt, \cos, \sin, \tan, \cot, \sec, \csc, \arcsin, \arccos, \arctan, \ln, \exp, \pi, e, \lfloor ... \rfloor, \lceil ... \rceil

使用LaTeX()包裹你的LaTeX字符串,即可获取LaTeX字符串的计算结果,内置许多详细报错。

Wrap your LaTeX string with LaTeX() to get the calculated result of the LaTeX string, with many detailed errors built in.

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

calctool-0.1.4.2.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

CalcTool-0.1.4.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file calctool-0.1.4.2.tar.gz.

File metadata

  • Download URL: calctool-0.1.4.2.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for calctool-0.1.4.2.tar.gz
Algorithm Hash digest
SHA256 96882a01aa9fb9d6eda7929be1c02d7c27ffe2d7e16d718db2abe6244ea521c4
MD5 52a25fe959a36ced6c5bbe4eca6973fe
BLAKE2b-256 ae97cfb2513f588f5b1edc68188f881b1fea4e155cd68644850f9bf467777063

See more details on using hashes here.

File details

Details for the file CalcTool-0.1.4.2-py3-none-any.whl.

File metadata

  • Download URL: CalcTool-0.1.4.2-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for CalcTool-0.1.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 97ceb05be5b0c41236e008aacf0b572022f8dd262595b5ea8860fb4ccbc413a5
MD5 4a94b8c6f63ea46263d0ed673f994605
BLAKE2b-256 920bec6ded482dc612f6fc917c9e4451d40b5c98c0322eda48179f2f35851bf4

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