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.2.tar.gz (45.2 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.2-py3-none-any.whl (47.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pycalc_pro-2.0.2.tar.gz
  • Upload date:
  • Size: 45.2 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.2.tar.gz
Algorithm Hash digest
SHA256 d380d13c6dc8dfa85b4dcebad93e406be844c7eee51f356a8f74770221337dcb
MD5 36436ab0fa9f6186e848e3ed20e25bd7
BLAKE2b-256 604cc842198577b0a3569124fc3bbbff4a30fb15342e86f086ef457adec4db3e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pycalc_pro-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 47.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 52d0b12db5eaea528d805694199c0c84d27c6df14b95950c9a7012142779563c
MD5 a327f0009adc3852f891d8b0989d3073
BLAKE2b-256 5113fc7d6098cc9a88ba3c1dbe7578beb12a2e4ad7e9a728af53058090e85f8e

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