Skip to main content

Türkçe destekli sembolik & sayısal Python matematik motoru

Project description

trmath 🔢

Türkçe destekli, sembolik & sayısal Python matematik motoru.

pip install trmath              # sadece çekirdek
pip install "trmath[symbolic]"  # + sympy (türev, integral, limit…)
pip install "trmath[full]"      # + sympy + numpy + matplotlib

Hızlı başlangıç

from trmath import TrMathEngine

engine = TrMathEngine()

# Sayısal
r = engine.calculate("2**10 + sin(pi/4)")
print(r.result)   # 1024.7071…

# Türkçe doğal dil
r = engine.calculate("karekök 144")
print(r.result)   # 12.0

# Sembolik (sympy gerekir)
r = engine.calculate("türev x**3 x")
print(r.result)        # 3*x**2
print(r.latex_output)  # 3 x^{2}

# Birim dönüşümü
r = engine.calculate("100 C -> F")
print(r.result)   # 212.0

# Toplu hesap
results = engine.batch_calculate(["2+2", "türev sin(x) x", "fib 10"])

Özellikler

Kategori Örnekler
Sayısal 2^10, sin(pi/4), log(e)
Doğal dil (TR) "5 artı 3", "karekök 16", "10 çarpı sin 30"
Sembolik türev, integral, limit, çöz, sadeleştir, faktör
İleri sembolik Taylor serisi, Laplace, Fourier
Sayı teorisi asal, EBOB, EKOK, Fibonacci, faktöriyel
İstatistik ortalama, standart sapma, varyans, medyan
Matris det, transpose, inverse, özdeğer
Grafik plot x**2 from -5 to 5, plot3d x**2+y**2
Birim 5 km -> m, 100 C -> F, 1 gb -> mb
Değişken x = 5, y = x*2

MathResult

Her hesap bir MathResult döner:

r = engine.calculate("integral x**2 x")

r.success          # True / False
r.result           # x**3/3
r.latex_output     # \frac{x^{3}}{3}
r.steps            # adım adım açıklama listesi
r.execution_time_ms
r.error            # hata varsa mesaj
r.plot_path        # grafik kaydedildiyse dosya yolu

CLI

trmath   # interaktif REPL başlatır

Güvenlik

  • Yasaklı kelime listesi (import, exec, eval, os., sys. …)
  • Parantez derinliği limiti (>20 reddedilir)
  • Input uzunluğu limiti (>5000 karakter reddedilir)
  • Timeout koruması (varsayılan 10s)

Geliştirme

git clone https://github.com/kullanici/trmath
cd trmath
pip install -e ".[dev]"
pytest

Lisans

MIT

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

trmath-1.0.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

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

trmath-1.0.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file trmath-1.0.0.tar.gz.

File metadata

  • Download URL: trmath-1.0.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for trmath-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5c6212003c35540c78fd9b34defb3a647c982730fa5b02f6b6dd502441f65d68
MD5 9e4df26c691232a43dc9908e97615eee
BLAKE2b-256 2429255e326f012a6f31b5b4f0a8608cd896842c2088daf890721ff7e46abfa7

See more details on using hashes here.

File details

Details for the file trmath-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: trmath-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for trmath-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 461f808ded5756178c788940db600da5498f16bd6d41d688183106367c4b6c73
MD5 0ed675a5854524b3dff86f1518cb998b
BLAKE2b-256 bbc8b533694d6b922c7559a5700f46c8da59eeafa175cb2ed0faa16cf3fee1b9

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