Skip to main content

A math library

Project description

Hello and Welcome!

About this repository 👀

Pygramer78, created this library in june 2025, with the idea of educational programming implemented to python.
Since i thought of this proyect, i made many stuff, like roman numbers, and all of that.
After all, i ended up using a lot of my time making this.
I hope you like it!

Instructions

Just read the example file.
Or i'll show it to you now. \

from number import *
from coordinates import *
from primes import *
from roman import *
from segments import *
# Known numbers:
print(f"pi number: {PI}")
print(f"euler number: {EULER}")
print(f"golden ratio number: {GOLDEN_RATIO}")
print(f"kaprekar number: {KAPREKAR}")

# Coordinates
coordenate = Coordinates(10, -10)
p = Coordinates(-10, 10)
print(coordenate - p) # Returns another coordinate with the subtraction / adding (coordenate + p)

# Color
color = Color("#911B1B")

# Roman:
roman_Number = Roman("XVII")
print(roman_Number.RomanToDec()) # 17
any_number = 10
print(DecToRoman(any_number)) # X

# Primes:
prime = 17
print(is_prime(prime, [2, 3, 5])) # True (means it's prime)
# The [2, 3, 5] list is another thing which you need to put in there (those are numbers minor than the prime you're checking)
print(generate_primes(40)) # Will generate prime numbers until the parameter you put (must be int) [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]
print(decompose(120)) # Will do a factorial decompose with the number you passed (may take a while)
print(mcm(12, 24)) # Returns the answer to the mcm
print(mcd(12, 24)) # Same as mcm but different operation


# Segments (matplotlib)
segment = Segments([(10, -10), (50, -10)])
segment.draw(color=color)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

pimath-0.7.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file pimath-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: pimath-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pimath-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ee22486cf3dbdb5a5622ea3dce718171ccb7cc40e7f2a17864ffb751ce585c8
MD5 95aa650d88c37f23e9194598c121d528
BLAKE2b-256 76d2b5a8ae9d91527daa437e7365ffe44453f803a0f81a27e9bc073676764d37

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