Skip to main content

No project description provided

Project description

PyMathAlgoS

1. Установка

$ pip install pymathalgos

2. Функционал

Простая арифметика

Функция вычисления факториала:

import pymathalgos
print(pymathalgos.factorial(2))	 # 1
print(pymathalgos.factorial(-1)) # ArithmeticError: argument value must be bigger then zero!

Функции для вычисления большего, меньшего числа из аргументов, а также суммы аргументов:

import pymathalgos

print(pymathalgos._min(2, 8, 1)) # 1
print(pymathalgos._max(2, 8, 9)) # 9
print(pymathalgos._sum(1, 2, 3)) # 6

Геометрия

Здесь вы можете увидеть готовые функции для геометрии

Просто константы:

import pymathalgos
print(pymathalgos.PI)		# число пи
print(pymathalgos.E)		# число е
print(pymathalgos.FI)		# число фи
print(pymathalgos.NULL)		# 0
print(pymathalgos.TAU)		# число тау: число пи * 2
print(pymathalgos.SQRT2)	# корень из 2
print(pymathalgos.SQRT3)	# корень из 3

Здесь просто функции из тригонометрии:

import pymathalgos
import pymathalgos.geometry as geometry

n = 90

#					Можно вычислять градусы или радианы
#						|
print(geometry.sin("degrees", n))
print(geometry.cos("degrees", n))

# Функции tan() и tg(), а также подобные функции означают одно и тоже 
print(geometry.tan("degrees", n))
print(geometry.tg("degrees", n))

print(geometry.asin("degrees", n))
print(geometry.acos("radians", 1))
print(geometry.atan("degrees", n))

print(geometry.sinh("degrees", n))
print(geometry.cosh("degrees", n))
print(geometry.tanh("radians", pymathalgos.PI))

print(geometry.asinh("degrees", n))
print(geometry.acosh("degrees", n))
print(geometry.atanh("degrees", n))

Если вы хотите узнать синус от градусов, а не от радиан есть простая функция sin_d(degrees).

import pymathalgos
# Эти две строки кода означают одно и тоже
print(pymathalgos.sin_r(pymathalgos.to_radians(90)))
print(pymathalgos.sin_d(90))

Можно получить расстояние от одной точки до другой

import pymathalgos
pos1 = (50, 40)
pos2 = (30, 20)
print(pymathalgos.point_distance(pos1, pos2))

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

pymathalgos-0.2.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

pymathalgos-0.2.1-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file pymathalgos-0.2.1.tar.gz.

File metadata

  • Download URL: pymathalgos-0.2.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Windows/10

File hashes

Hashes for pymathalgos-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f70d7b0ca086fb3b3a45efe2b02b3f20fc8f9d5a00234679ae8d5f0f6959afde
MD5 41d4b1ca6dea0e5f134c6cf14b1b8d9d
BLAKE2b-256 7d94f5addb4825ea20ca13ee6525be5aaf8986eed9d1e9755ea12a56cb0fbd0f

See more details on using hashes here.

File details

Details for the file pymathalgos-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pymathalgos-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Windows/10

File hashes

Hashes for pymathalgos-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 946c8da9002b02f024a0edf2222d4b497ba7164f8e70347131aa4d3939e23d8b
MD5 b6cc90b0b8b5d250a83111e341368124
BLAKE2b-256 a717de61cbf236b3422032f3656834e69d3473e1e94adc6a1a7b52f2c7750657

See more details on using hashes here.

Supported by

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