PI

sabit PI

Math Module - Scientific Mathematics

University-level + Research + Engineering mathematics library.

Üniversite seviyesi + Araştırma + Mühendislik matematik kütüphanesi.

Inspired By / İlham Kaynakları

  • Julia Math + FastMath + SpecialFunctions
  • NumPy / SciPy (Python scientific computing)
  • Rust: nalgebra, ndarray, statrs, argmin
  • GNU Scientific Library (GSL)
  • BLAS/LAPACK/LINPACK standards
  • MATLAB/Octave mathematical functions

Features / Özellikler

Basic Functions / Temel Fonksiyonlar

  • abs(), sign(), max(), min(), clamp() - Basic arithmetic / Temel aritmetik
  • pow(), sqrt(), cbrt() - Power and roots / Üs ve kökler

Trigonometry / Trigonometri

  • sin(), cos(), tan() - Trigonometric functions (radians) / Trigonometrik fonksiyonlar (radyan)
  • asin(), acos(), atan(), atan2() - Inverse trig / Ters trigonometrik
  • sinh(), cosh(), tanh() - Hyperbolic functions / Hiperbolik fonksiyonlar
  • deg_to_rad(), rad_to_deg() - Angle conversion / Açı dönüşümü

Exponential & Logarithmic / Üstel & Logaritmik

  • exp(), exp2(), expm1() - Exponential / Üstel
  • ln(), log2(), log10(), log() - Logarithms / Logaritmalar

Special Functions / Özel Fonksiyonlar

  • gamma(), lgamma() - Gamma function / Gamma fonksiyonu
  • beta() - Beta function / Beta fonksiyonu
  • erf(), erfc() - Error functions / Hata fonksiyonları
  • bessel_j(), bessel_y() - Bessel functions / Bessel fonksiyonları

Numerical Methods / Sayısal Yöntemler

  • newton_raphson() - Root finding / Kök bulma
  • bisection() - Interval bisection / Aralık ikiye bölme
  • simpson(), trapezoid() - Numerical integration / Sayısal integral
  • linear_interp(), cubic_spline() - Interpolation / İnterpolasyon

Constants / Sabitler

  • PI (π = 3.14159...), E (2.71828...), PHI (1.618...) - Mathematical constants / Matematiksel sabitler
  • LIGHT_SPEED, PLANCK, BOLTZMANN - Physical constants / Fiziksel sabitler

Example / Örnek

kullan math

// Trigonometry / Trigonometri
değişken açı = math.deg_to_rad(45.0)  // 45° -> radyan
değişken sin_val = math.sin(açı)  // 0.707...

// Power and roots / Üs ve kökler
değişken kare = math.pow(5.0, 2.0)  // 25.0
değişken kök = math.sqrt(25.0)  // 5.0

// Special functions / Özel fonksiyonlar
değişken fakt = math.gamma(5.0)  // 4! = 24

Performance / Performans

  • LLVM fast-math optimizations enabled
  • Hardware-accelerated trigonometry (FPU)
  • SIMD vectorization for array operations

Backend

  • LLVM intrinsics (sqrt, sin, cos, exp, log)
  • libm (GNU C Math Library)
  • Custom BERK implementations for special functions