Skip to main content

PyCalc Pro – High-performance AI math engine with physics, units, and sequence operations.

Project description

PyCalc Pro v2.0.1

A high-performance mathematical computing engine written in Python — designed for AI systems and scientific computing with advanced mathematics, physics calculations, and sequence operations featuring multi-backend acceleration and memory optimization.


Version Notes

v2.0.1 — November 2025

  • Performance Upgrade: Phase 3 optimizations with C++ extensions and GPU acceleration
  • Multi-Backend Support: C++, Numba JIT, and pure Python fallbacks
  • Memory Optimization: Advanced memory pooling for reduced allocations
  • Expanded Modules: Sequences, unit operations, and physics calculations
  • License Change: Updated to BSD 3-Clause license
  • Code Quality: Fixed Numba signatures and consistent error handling

Features

Core Mathematical Operations

  • Basic Arithmetic: Optimized addition, subtraction, multiplication, division
  • Advanced Functions: Power, roots, logarithms, exponentials
  • Trigonometric Functions: Sine, cosine, tangent with degree support
  • Special Functions: Factorial, modulus, absolute value
  • Batch Processing: Parallel execution for large datasets

Physics Engine

  • Classical Mechanics: Kinetic energy, potential energy, centripetal force
  • Relativity: Time dilation, length contraction, relativistic gamma
  • Quantum Mechanics: de Broglie wavelength, Schwarzschild radius
  • Thermodynamics: Ideal gas law calculations
  • Projectile Motion: Range calculations with custom gravity

Sequence & Number Theory

  • Mathematical Sequences: Fibonacci, arithmetic, geometric progressions
  • Prime Operations: Prime checking, factorization, prime generation
  • Combinatorics: Permutations, combinations, factorial operations
  • Series Calculations: Summation, product sequences

Unit Operations

  • Unit Conversion: Comprehensive unit system support
  • Dimensional Analysis: Automatic unit validation and conversion
  • Physical Constants: Extensive library of scientific constants

Performance Optimizations

  • C++ Extensions: Critical operations accelerated with C++
  • GPU Acceleration: CUDA support for large batch operations
  • Memory Pooling: Reduced allocation overhead
  • Numba JIT: Just-in-time compilation for numerical functions
  • Smart Backend Selection: Automatic optimization based on operation size
  • Error Handling: Comprehensive validation and error codes

Architecture

pycalc-pro/
├── core/ # Core mathematical engines ├── math_ops.py # Phase 3 optimized math operations ├── calculator.py # Main calculator engine ├── physics_ops.py # Physics calculations ├── sequences.py # Sequence and number theory ├── unit_ops.py # Unit operations and conversions ├── cpp_bridge.py # C++ extensions interface ├── cpp_extensions.cpp # C++ acceleration code ├── gpu_accelerator.py # GPU acceleration └── performance.py # Performance monitoring
├── interface/ # User interfaces ├── cli.py # Command-line interface └── ai_interface.py # Interface for AI systems
├── utils/ # Support utilities ├── cache.py # Intelligent caching system ├── memory_pool.py # Memory optimization ├── constants.py # Physical and mathematical constants └── evaluator.py # Expression evaluation
├── examples/ # Usage examples └── ai_usage.py # AI system integration examples
└── dist/ # Distribution files

Installation & Usage

Option 1: Install from PyPI (Recommended)

pip install pycalc-pro
pycalc

Option 2: Install from GitHub

pip install git+https://github.com/lw-xiong/pycalc-pro.git
pycalc

Option 3: Clone and Run

git clone https://github.com/lw-xiong/pycalc-pro.git
cd pycalc-pro
pip install -e .
pycalc

AI System Integration

from pycalc_pro.core.math_ops import MathOperations
from pycalc_pro.core.physics_ops import PhysicsOperations

# High-performance math for AI systems
math_engine = MathOperations()
result = math_engine.power(2, 10)  # 1024

# Physics calculations for scientific AI
physics_engine = PhysicsOperations()
ke = physics_engine.kinetic_energy(10, 5)  # 125 J

Performance Features

  • Memory Optimization: Reduced allocations via memory pooling
  • Multi-Backend: Automatic selection of C++ → Numba → Python backends
  • Batch Processing: Parallel execution for large-scale computations
  • Error Safety: Comprehensive error codes and validation
  • GPU Support: Optional CUDA acceleration for large datasets

Author

Li Wen Xiong (李文雄) GitHub: @lw-xiong


License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.


PyCalc Pro v2.0.1 — Optimized for Scientific Computing

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

pycalc_pro-2.0.1.tar.gz (45.1 kB view details)

Uploaded Source

Built Distribution

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

pycalc_pro-2.0.1-py3-none-any.whl (47.6 kB view details)

Uploaded Python 3

File details

Details for the file pycalc_pro-2.0.1.tar.gz.

File metadata

  • Download URL: pycalc_pro-2.0.1.tar.gz
  • Upload date:
  • Size: 45.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for pycalc_pro-2.0.1.tar.gz
Algorithm Hash digest
SHA256 6a31662872e08282bcacb984fe2f210a0e0a59afa1feeaefb36016bacc9a4d67
MD5 54e2cd345d3b5412156868c33c3f081c
BLAKE2b-256 9d87e34d196761f0d74630d9e7f1b1c3015bf352f5e6830977f513b485347f91

See more details on using hashes here.

File details

Details for the file pycalc_pro-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: pycalc_pro-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 47.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for pycalc_pro-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e4d9040c9441e6eec076c2101706986d2aa44a605b451a755121c0a2b069b5f
MD5 4048d37a3d17cbc243c9b800b5f9f879
BLAKE2b-256 ae1e6ceb2b10c7063c0bf8602b76b47bf0ef756b9cf6ac09eaec7839a7c4e6ac

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