Skip to main content

A cross-platform Python calculator library using Go-based native implementations

Project description

PyCalGo

A high-performance, cross-platform Python calculator library using Go-based native implementations.

Features

Basic Arithmetic

  • Addition, subtraction, multiplication, division
  • Integer operations with native Go performance

Scientific Functions

  • Square root, power, logarithm
  • Trigonometric functions (sin, cos, tan)
  • Double precision floating-point operations

Unique Fast Operations

  • Fast bit counting for 64-bit integers
  • Modular factorial computation
  • XorShift pseudo-random number generation

Installation

pip install pycalgo

Quick Start

import pycalgo

# Basic arithmetic
print(pycalgo.add(10, 5))        # 15
print(pycalgo.mul(6, 7))         # 42

# Scientific functions
print(pycalgo.sqrt(16))          # 4.0
print(pycalgo.sin(1.57))         # ~1.0

# Fast operations
print(pycalgo.bitcount(15))      # 4 (binary: 1111)
print(pycalgo.factmod(5, 7))     # 1 (5! mod 7)

# Random number generation
rand, new_seed = pycalgo.xorshift(12345)
print(f"Random: {rand}")

Platform Support

  • Windows: Uses calculator.dll
  • Linux: Uses calculator.so
  • macOS: Uses calculator.dylib

Requirements

  • Python 3.6 or higher
  • Native library automatically selected based on OS

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

pycalgo-0.3.0.tar.gz (3.1 MB view details)

Uploaded Source

Built Distribution

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

pycalgo-0.3.0-py3-none-any.whl (3.1 MB view details)

Uploaded Python 3

File details

Details for the file pycalgo-0.3.0.tar.gz.

File metadata

  • Download URL: pycalgo-0.3.0.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pycalgo-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ef3204f42fdc0380cccc40edf7c4569433831221a9aad44829f222da822bef2e
MD5 0d8991c3d6588ccc0993d28f5a1939a5
BLAKE2b-256 d54d522f48a88d05cf678cb7fe4afaa90dc3d2e618f9c8fecadc3c71e29a8a55

See more details on using hashes here.

File details

Details for the file pycalgo-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pycalgo-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pycalgo-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d4837af3545625c746cc34e1d385d56202fae7af0560989dbfc4e3e47374c32
MD5 8c27ae9aeed3eb3ad263a643d962c0fd
BLAKE2b-256 e9bc4fee261137e7a58048973c0d94e84465c18934effaaba6d9f6bbe7c72c80

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