phvmaths 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Publicar no PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*' # Vai rodar toda vez que você criar uma versão v0.1.0, etc.
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-n-publish:
|
|
10
|
+
name: Build e Publish
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
id-token: write # Essencial para o Trusted Publisher
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- name: Set up Python
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.x"
|
|
22
|
+
- name: Install build
|
|
23
|
+
run: python -m pip install build
|
|
24
|
+
- name: Build package
|
|
25
|
+
run: python -m build
|
|
26
|
+
- name: Publish to PyPI
|
|
27
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
phvmaths-0.1.0/License
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright (c) 2026 Vicente
|
|
2
|
+
|
|
3
|
+
files (the "Software"), to deal
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
phvmaths-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: phvmaths
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Biblioteca Phvmath: Matemática e Física avançada para Python.
|
|
5
|
+
Author-email: Vicente <vicentegoettemsm@gmail.com>
|
|
6
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
7
|
+
Classifier: Operating System :: OS Independent
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Requires-Python: >=3.9
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
|
|
12
|
+
# 🧮 Phvmath
|
|
13
|
+
|
|
14
|
+
**Phvmath** é uma biblioteca Python focada em cálculos matemáticos e físicos, desenvolvida para ser leve e eficiente.
|
|
15
|
+
|
|
16
|
+
## 🚀 Funcionalidades
|
|
17
|
+
|
|
18
|
+
- **Básicas**: Potência, Raiz Quadrada.
|
|
19
|
+
- **Álgebra**: Cálculo de Delta e Fórmula de Bhaskara.
|
|
20
|
+
- **Trigonometria**: Seno, Cosseno e Tangente (em graus).
|
|
21
|
+
- **Avançadas**: Fatorial, Somatório (Sigma) e Integrais.
|
|
22
|
+
- **Pi Dinâmico**: Calcule o valor de Pi com até 1000 casas decimais de precisão.
|
|
23
|
+
|
|
24
|
+
## 📦 Instalação
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install Phvmath
|
phvmaths-0.1.0/README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# 🧮 Phvmath
|
|
2
|
+
|
|
3
|
+
**Phvmath** é uma biblioteca Python focada em cálculos matemáticos e físicos, desenvolvida para ser leve e eficiente.
|
|
4
|
+
|
|
5
|
+
## 🚀 Funcionalidades
|
|
6
|
+
|
|
7
|
+
- **Básicas**: Potência, Raiz Quadrada.
|
|
8
|
+
- **Álgebra**: Cálculo de Delta e Fórmula de Bhaskara.
|
|
9
|
+
- **Trigonometria**: Seno, Cosseno e Tangente (em graus).
|
|
10
|
+
- **Avançadas**: Fatorial, Somatório (Sigma) e Integrais.
|
|
11
|
+
- **Pi Dinâmico**: Calcule o valor de Pi com até 1000 casas decimais de precisão.
|
|
12
|
+
|
|
13
|
+
## 📦 Instalação
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install Phvmath
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "phvmaths"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name="Vicente", email="vicentegoettemsm@gmail.com" },
|
|
10
|
+
]
|
|
11
|
+
description = "Biblioteca Phvmath: Matemática e Física avançada para Python."
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.9"
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[tool.hatch.build.targets.wheel]
|
|
21
|
+
packages = ["src/Phvmath"]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import math
|
|
2
|
+
from decimal import Decimal, getcontext
|
|
3
|
+
|
|
4
|
+
# --- Constantes ---
|
|
5
|
+
G = 9.80665
|
|
6
|
+
|
|
7
|
+
# --- Funções Básicas ---
|
|
8
|
+
def potencia(base, exp):
|
|
9
|
+
return base ** exp
|
|
10
|
+
|
|
11
|
+
def raiz(n):
|
|
12
|
+
return n ** 0.5
|
|
13
|
+
|
|
14
|
+
# --- Funções Médias ---
|
|
15
|
+
def delta(a, b, c):
|
|
16
|
+
return (b**2) - (4 * a * c)
|
|
17
|
+
|
|
18
|
+
def bhaskara(a, b, c):
|
|
19
|
+
d = delta(a, b, c)
|
|
20
|
+
if d < 0: return "Sem raízes reais"
|
|
21
|
+
x1 = (-b + d**0.5) / (2 * a)
|
|
22
|
+
x2 = (-b - d**0.5) / (2 * a)
|
|
23
|
+
return x1, x2
|
|
24
|
+
|
|
25
|
+
# --- Funções Complexas ---
|
|
26
|
+
def fatorial(n):
|
|
27
|
+
return math.factorial(n)
|
|
28
|
+
|
|
29
|
+
def sigma(dados):
|
|
30
|
+
return sum(dados)
|
|
31
|
+
|
|
32
|
+
def pi(n):
|
|
33
|
+
"""Retorna pi com n casas decimais (máx 1000 p/ segurança)"""
|
|
34
|
+
if n > 1000: n = 1000
|
|
35
|
+
getcontext().prec = n + 2
|
|
36
|
+
p = Decimal(0)
|
|
37
|
+
for k in range(n + 5):
|
|
38
|
+
p += (Decimal(1)/(16**k)) * (
|
|
39
|
+
Decimal(4)/(8*k+1) - Decimal(2)/(8*k+4) -
|
|
40
|
+
Decimal(1)/(8*k+5) - Decimal(1)/(8*k+6)
|
|
41
|
+
)
|
|
42
|
+
return str(p)[:n+2]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .Phvmath import *
|