Gelişmiş Matematiksel Hesap Makinesi Web Uygulaması
Özellikler • Kurulum • Kullanım • Teknik Detaylar • API
- Genel Bakış
- Özellikler
- Kurulum
- Kullanım
- Hesap Makinesi Modları
- Teknik Detaylar
- Mimari
- API Referansı
- Performans
- Tarayıcı Desteği
- Katkıda Bulunma
- Lisans
MathPro Calculator, modern web teknolojileri kullanılarak geliştirilmiş, profesyonel ve ileri düzey matematiksel işlemleri destekleyen bir hesap makinesi uygulamasıdır. Temel aritmetik işlemlerden ileri düzey bilimsel hesaplamalara, matris işlemlerinden denklem çözücüye kadar geniş bir fonksiyon yelpazesi sunar.
- 🎨 Premium Dark Theme - Glassmorphism efektler ile modern arayüz
- 🧮 5 Farklı Hesaplama Modu - Temel, Bilimsel, Matris, Çözücü, Dönüştürücü
- ⚡ Yüksek Performans - Vanilla JavaScript ile optimize edilmiş
- 📱 Fully Responsive - Tüm cihazlarda mükemmel çalışır
- ⌨️ Klavye Desteği - Hızlı kullanım için keyboard shortcuts
- 💾 Persistent Storage - LocalStorage ile geçmiş ve ayar kaydetme
- 🎭 Smooth Animations - Hardware-accelerated CSS animations
- Aritmetik işlemler (toplama, çıkarma, çarpma, bölme)
- Ondalık sayı desteği
- Akıllı parantez sistemi
- Yüzde hesaplamaları
- İşlem önceliği (PEMDAS)
- Trigonometrik Fonksiyonlar: sin, cos, tan, asin, acos, atan
- Açı Birimleri: Derece (DEG) ve Radyan (RAD) desteği
- Logaritmik Fonksiyonlar: log (taban 10), ln (doğal logaritma)
- Üstel Fonksiyonlar: eˣ, xʸ, x²
- Kök Fonksiyonlar: √x (karekök)
- Faktöriyel: n!
- Sabitler: π (pi), e (euler sabiti)
- Determinant hesaplama
- Ters matris (inverse)
- Transpose işlemi
- Matris toplama ve çıkarma
- Matris çarpma
- JSON formatında matris girişi
- Doğrusal Denklem: ax + b = c formatında
- İkinci Derece Denklem: ax² + bx + c = 0 (gerçel ve kompleks kökler)
- Türev Hesaplama: Sembolik türev alma
- Uzunluk: Meter, Kilometer, Mile, Foot, Inch, vb.
- Kütle: Kilogram, Gram, Pound, Ounce, vb.
- Sıcaklık: Celsius, Fahrenheit, Kelvin
- Zaman: Second, Minute, Hour, Day, Week, Year
- CSS Custom Properties - Tutarlı design tokens
- Glassmorphism Effects - Blur ve transparency
- Gradient Backgrounds - Animated radial gradients
- Color Palette:
- Primary:
#0a0e27(Deep Navy) - Accent:
#6366f1→#8b5cf6(Indigo to Purple) - Text:
#f1f5f9(Soft White)
- Primary:
- Entrance Animations: Fade-in, Slide-down effects
- Button Interactions: Ripple, Scale, Glow effects
- Panel Transitions: Smooth sliding animations
- Number Display: Cascade effect
- Background: Subtle gradient animation (15s cycle)
-
Geçmiş Yönetimi:
- Son 50 hesaplama otomatik kaydedilir
- Tek tıkla geçmişten yükleme
- Geçmişi temizleme
-
Ayarlar:
- Hassasiyet (0-15 ondalık basamak)
- Açı birimi (DEG/RAD)
- Ses efektleri toggle
-
Sidebar Navigation:
- Geçmiş sidebar (sağdan kayarak)
- Ayarlar sidebar
- Overlay ile focus
- Modern web tarayıcısı (Chrome 90+, Firefox 88+, Safari 14+, Edge 90+)
- JavaScript etkin
- İnternet bağlantısı (Math.js CDN için)
- Projeyi İndirin
git clone https://github.com/CanSagnak/promath.git
cd mathpro-calculator- Dosyayı Açın
open index.htmlveya
Tarayıcınızda index.html dosyasını açın.
Math.js kütüphanesini lokal olarak kullanmak için:
- Math.js'i indirin:
npm install mathjsindex.htmliçindeki CDN linkini güncelleyin:
<!-- CDN yerine -->
<script src="node_modules/mathjs/lib/browser/math.js"></script>mathpro-calculator/
├── index.html # Ana HTML dosyası
├── style.css # Stil dosyası
├── script.js # JavaScript mantığı
└── README.md # Dokümantasyon
-
Hesaplama Yapma:
- Butonları tıklayarak veya klavyeden giriş yapın
=veyaEnterile hesaplayın- Sonuç otomatik görüntülenir
-
Mod Değiştirme:
- Üst sekmeleri kullanarak mod değiştirin
- Her mod özel işlevlere sahiptir
-
Geçmiş Görüntüleme:
- Sağ üstteki saat ikonuna tıklayın
- Geçmiş hesaplamalara göz atın
- İlgili sonuca tıklayarak yükleyin
| Tuş | İşlev |
|---|---|
0-9 |
Rakam girişi |
+ - * / |
Operatörler |
. |
Ondalık nokta |
Enter |
Hesaplama |
Backspace |
Silme |
Escape |
Temizleme |
( ) |
Parantezler |
5 + 3 × 2 = 11
(5 + 3) × 2 = 16
100 ÷ 4 = 25
sin(30) = 0.5 (DEG modunda)
log(100) = 2
5! = 120
π × 2 = 6.283...
√16 = 4
2^8 = 256
// Matris A
[[1, 2], [3, 4]]
// Determinant
-2
// Ters Matris
[[-2, 1], [1.5, -0.5]]// Doğrusal
2*x + 5 = 15 → x = 5
// İkinci Derece
x² - 5x + 6 = 0 → x₁ = 3, x₂ = 2
// Türev
d/dx(x² + 2x + 1) = 2x + 2
| Kategori | Teknoloji | Versiyon |
|---|---|---|
| Markup | HTML5 | - |
| Styling | CSS3 | - |
| Scripting | Vanilla JavaScript | ES6+ |
| Math Engine | Math.js | 12.2.1 |
:root {
--color-bg-primary: #0a0e27;
--color-accent-primary: #6366f1;
--spacing-md: 1rem;
--font-family: 'Inter', sans-serif;
--transition-base: 250ms ease;
}- Layout: Flexbox & Grid
- Spacing: 6-step scale (xs → 2xl)
- Typography: Inter font family, 7 size scales
- Colors: Semantic naming convention
- Radius: 4-step scale
- Transitions: 3-speed system
const state = {
currentExpression: '0',
currentResult: '',
currentMode: 'basic',
angleMode: 'deg',
precision: 10,
history: [],
parenthesesOpen: 0
};Expression Evaluation
function evaluateExpression(expr) {
// Symbol replacement (π → pi, × → *)
// Angle mode handling (DEG/RAD conversion)
// Factorial processing
// Math.js evaluation
// Result formatting
}Matrix Operations
function handleMatrixOperation(operation) {
// Parse JSON input
// Execute operation (det, inv, transpose, etc.)
// Format and display result
}Unit Conversion
function convertUnits() {
// Get conversion factors
// Handle special cases (temperature)
// Calculate and display result
}- Delegation: Event delegation for buttons
- Keyboard: Global keyboard listener
- State Updates: Reactive display updates
- Storage: Auto-save to localStorage
{
expression: String, // "2 + 2"
result: String, // "4"
timestamp: Number // Unix timestamp
}{
length: {
meter: 1,
kilometer: 1000,
// ...
},
temperature: {
celsius: { offset: 0, factor: 1 },
// Special handling
}
}App
├── Header
│ ├── Logo
│ └── Actions (History, Settings buttons)
├── Calculator Card
│ ├── Mode Tabs
│ ├── Display Container
│ │ ├── Expression Display
│ │ └── Result Display
│ └── Panels
│ ├── Basic Panel
│ ├── Scientific Panel
│ ├── Matrix Panel
│ ├── Solver Panel
│ └── Converter Panel
├── Sidebars
│ ├── History Sidebar
│ └── Settings Sidebar
└── Overlay
User Input → Event Handler → State Update → Display Render
↓
LocalStorage Sync
// State Management
const state = { ... };
// DOM Cache
const elements = { ... };
// Initialization
function init() { ... }
// Event Handlers
function handleButtonClick() { ... }
// Business Logic
function evaluateExpression() { ... }
// Utility Functions
function formatResult() { ... }Matematiksel ifadeyi değerlendirir.
Parameters:
expr(string): Matematiksel ifade
Returns:
number: Hesaplama sonucu
Throws:
Error: Geçersiz ifade durumunda
Example:
evaluateExpression("2 + 2") // 4
evaluateExpression("sin(30)") // 0.5 (DEG mode)Mevcut ifadeyi hesaplar ve gösterir.
Side Effects:
- State güncelleme
- Display render
- History ekleme
Hesap makinesi modunu değiştirir.
Parameters:
mode(string): 'basic' | 'scientific' | 'matrix' | 'solver' | 'converter'
Example:
switchMode('scientific')Matris işlemi gerçekleştirir.
Parameters:
operation(string): 'determinant' | 'inverse' | 'transpose' | 'add' | 'subtract' | 'multiply'
Example:
// matrixA = [[1,2],[3,4]]
handleMatrixOperation('determinant') // -2Doğrusal denklemi çözer.
Input: linearEq element value
Example:
// Input: "2*x + 5 = 15"
// Output: "x = 5"İkinci derece denklemi çözer.
Input: quadA, quadB, quadC element values
Example:
// Input: a=1, b=-5, c=6
// Output: "x₁ = 3\nx₂ = 2"Sonucu kullanıcı dostu formatta gösterir.
Parameters:
result(number): Ham sonuç
Returns:
string: Formatlanmış sonuç
Features:
- Precision control
- Scientific notation for large/small numbers
- Zero threshold handling
Geçmişe yeni hesaplama ekler.
Parameters:
expression(string): Hesaplama ifadesiresult(string): Sonuç
Side Effects:
- State update
- LocalStorage sync
- History limit (50 items)
-
Minimal Dependencies
- Sadece Math.js external dependency
- Vanilla JavaScript (framework yok)
- Bundle size: ~51KB (gzipped ~15KB)
-
CSS Performansı
- Hardware-accelerated animations (transform, opacity)
- CSS containment where applicable
- Efficient selectors
-
JavaScript Performansı
- Event delegation
- Debounced calculations
- Efficient DOM updates
- LocalStorage throttling
-
Rendering
- 60 FPS animations
- Reflow/repaint optimization
- Layout thrashing prevention
| İşlem | Süre |
|---|---|
| Temel hesaplama | <1ms |
| Bilimsel fonksiyon | ~1-2ms |
| Matris (3x3) | ~5ms |
| Denklem çözme | ~10ms |
| Component render | <16ms |
index.html: ~14KB
style.css: ~17KB
script.js: ~20KB
-----------------------
Total: ~51KB (uncompressed)
Math.js: ~500KB (CDN)
| Tarayıcı | Minimum Versiyon | Test Edildi |
|---|---|---|
| Chrome | 90+ | ✅ 120+ |
| Firefox | 88+ | ✅ 115+ |
| Safari | 14+ | ✅ 16+ |
| Edge | 90+ | ✅ 120+ |
| Opera | 76+ | ✅ 105+ |
- ✅ ES6+ JavaScript
- ✅ CSS Grid & Flexbox
- ✅ CSS Custom Properties
- ✅ CSS Animations
- ✅ LocalStorage API
- ✅ Fetch API (future)
CSS custom properties'i değiştirerek tema özelleştirin:
:root {
--color-bg-primary: #your-color;
--color-accent-primary: #your-accent;
/* ... */
}Default precision değiştirmek için:
state.precision = 15; // 0-15 arası- HTML'e buton ekleyin
- Event handler kaydedin
- İlgili fonksiyonu implement edin
Katkılarınızı bekliyoruz! Lütfen şu adımları izleyin:
- Fork edin
- Feature branch oluşturun (
git checkout -b feature/AmazingFeature) - Commit edin (
git commit -m 'Add some AmazingFeature') - Push edin (
git push origin feature/AmazingFeature) - Pull Request açın
- Clean, okunabilir kod yazın
- Consistent naming conventions
- Comment ekleyin (ihtiyaç halinde)
- Responsive tasarıma dikkat edin
- Performance optimize edin
Bu proje MIT lisansı altında lisanslanmıştır. Detaylar için LICENSE dosyasına bakın.
- Math.js - Güçlü matematik kütüphanesi
- Inter Font - Modern typography
- Google Fonts - Font hosting
- Tüm katkıda bulunanlara
⭐ Projeyi beğendiyseniz yıldız vermeyi unutmayın!
Made with Can Sağnak