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-2.0.0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

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

trmath-2.0.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for trmath-2.0.0.tar.gz
Algorithm Hash digest
SHA256 2432faafa7023ca26de7baa5d36e793f95854179c0a733bec00db88f20f7a97a
MD5 6a357aead346da10d1671afe0c3bd2dd
BLAKE2b-256 4fa746a242c60e1ab4555d95bf56568ec0142291bbbcddc1078c0d6c0177c6ea

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for trmath-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1f184279784c04c3cd5b4309533635dca4006c9748ad8d47aed58c66ee27f59
MD5 d9575bc6b34edbfd0776df0109cdd47f
BLAKE2b-256 ca3b2703c55c65c7f23549d6d58b2a101f432255e86821a2dec54236d6d3ed63

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