Skip to main content
Glama
MCP Math Server

MCP Math Server

by IBM

🧮 Chuk MCP Math Server

PyPI version Python 3.11+ Tests Coverage License: Apache 2.0

A highly configurable Mathematical Computation Protocol (MCP) server that provides comprehensive mathematical functions with flexible transport options. Built on the high-performance chuk-mcp-server framework.

⚔ Performance

  • 36,000+ RPS peak throughput (inherited from chuk-mcp-server)

  • Sub-3ms latency per tool call

  • 642 Mathematical Functions available

  • Zero-config startup - works out of the box

Related MCP server: Math MCP Server

✨ Features

šŸ”¢ Mathematical Capabilities

  • 642 Mathematical Functions across multiple domains

  • Number Theory: Prime testing, factorization, GCD, LCM, sequences (328 functions)

  • Arithmetic: Basic operations, advanced calculations (44 functions)

  • Trigonometry: Comprehensive trigonometric operations (71 functions)

  • Linear Algebra: Vector and matrix operations (33 functions)

  • Statistics: Descriptive and inferential statistics (15 functions)

  • Calculus: Derivatives, integration, root finding (9 functions)

  • Geometry: Shapes, distances, intersections (12 functions)

  • Probability: Distribution functions (10 functions)

  • Advanced Operations: Complex mathematical operations (22 functions)

  • Sequences: Mathematical sequences (12 functions)

  • Constants: Mathematical constants (25 functions)

  • Conversions: Unit and type conversions (7 functions)

  • Real-time Computation: Async processing with proper error handling

  • Function Filtering: Configurable allowlists and denylists by domain, category, or function

šŸš€ Transport & Architecture

  • Dual Transport: STDIO (Claude Desktop) and HTTP support

  • High Performance: Built on chuk-mcp-server framework

  • Auto-detection: Automatically selects optimal transport mode

  • Production Ready: 36,000+ RPS, <3ms latency

  • Type Safe: Automatic schema generation from Python type hints

āš™ļø Configuration

  • CLI Configuration: Comprehensive command-line options

  • File Configuration: YAML and JSON config file support

  • Environment Variables: Container-friendly configuration

  • Dynamic Filtering: Runtime function filtering with allowlists and denylists

  • Granular Control: Filter by function, domain, or category

šŸ›”ļø Production Features

  • Zero Configuration: Works out of the box with sensible defaults

  • High Test Coverage: 97% code coverage with 114 comprehensive tests

  • Type Safe: 100% type-checked with mypy, fully Pydantic-native

  • Error Handling: Graceful failure management

  • Logging: Configurable log levels and output

  • MCP Resources: Built-in resources for function discovery and stats

  • Timeout Management: Configurable computation timeouts

šŸš€ Quick Start

šŸ’” Try it now! Use our free public server at https://math.chukai.io/mcp - no installation required! See Public Server section below.

Installation

The easiest way to use the server is with uvx, which runs it without installing:

uvx chuk-mcp-math-server

This automatically downloads and runs the latest version. Perfect for Claude Desktop!

# Install from PyPI
uv pip install chuk-mcp-math-server

# Or clone and install from source
git clone https://github.com/chuk-mcp/chuk-mcp-math-server.git
cd chuk-mcp-math-server
uv sync

Using pip (Traditional)

pip install chuk-mcp-math-server

Basic Usage

STDIO Transport (Claude Desktop)

# Start server with STDIO transport (default)
uv run chuk-mcp-math-server

# Starts immediately with all 642 functions available

HTTP Transport (Web APIs)

# Start HTTP server
uv run chuk-mcp-math-server --transport http --port 8000

# Server will be available at http://localhost:8000

Claude Desktop Integration

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

Option 1: Use the Public Server (Easiest)

Connect to the hosted public server:

{
  "mcpServers": {
    "math": {
      "command": "uvx",
      "args": [
        "chuk-mcp-client",
        "https://math.chukai.io/mcp"
      ]
    }
  }
}

This requires no local installation and is always up-to-date!

Option 2: Run Locally with uvx

{
  "mcpServers": {
    "math": {
      "command": "uvx",
      "args": ["chuk-mcp-math-server"]
    }
  }
}

Option 3: Run Locally with Local Installation

{
  "mcpServers": {
    "math": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/chuk-mcp-math-server",
        "run",
        "chuk-mcp-math-server"
      ]
    }
  }
}

Important: Use absolute paths, not relative or ~ paths.

Restart Claude Desktop and ask: "Can you check if 97 is prime?" - Claude will use the math server!

Example HTTP API Usage

# Test the server
curl http://localhost:8000/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list"
  }'

# Call a mathematical function
curl http://localhost:8000/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "is_prime",
      "arguments": {"n": 97}
    }
  }'

šŸ“– Documentation

Available Functions

The server provides 642 mathematical functions across these domains:

Domain

Functions

Examples

Arithmetic & Number Theory (420)

Basic operations, primes, sequences, divisibility

add, multiply, modulo, is_prime, fibonacci, gcd

Trigonometry (71)

Trig functions, hyperbolic, conversions

sin, cos, tan, sinh, radians_to_degrees

Linear Algebra (33)

Vector and matrix operations

dot_product, cross_product, matrix_multiply

Statistics (15)

Descriptive statistics

mean, median, std_dev, variance

Calculus (9)

Derivatives, integration, root finding

derivative, integrate, newton_raphson

Geometry (12)

Shapes, distances, intersections

circle_area, distance, triangle_area

Probability (10)

Distribution functions

normal_pdf, binomial_pmf

Other (17)

Advanced operations, sequences, constants, conversions

factorial, combinations, pi_digits

Function Filtering

Control which functions are exposed:

# Only expose specific functions
chuk-mcp-math-server --functions add subtract multiply divide

# Expose only arithmetic domain
chuk-mcp-math-server --domains arithmetic

# Exclude specific functions
chuk-mcp-math-server --exclude-functions slow_function

# Combine filters
chuk-mcp-math-server --domains arithmetic number_theory --categories core primes

Configuration Options

Command Line

# Basic configuration
chuk-mcp-math-server --transport http --port 8080 --host 0.0.0.0

# Function filtering
chuk-mcp-math-server --domains arithmetic --functions is_prime add

# Performance tuning
chuk-mcp-math-server --cache-strategy smart --timeout 60

# Logging
chuk-mcp-math-server --verbose  # Debug logging
chuk-mcp-math-server --quiet    # Minimal logging

Configuration File

# config.yaml
transport: "http"
port: 8000
host: "0.0.0.0"
log_level: "INFO"

# Function filtering (allowlist: only these are enabled, denylist: these are excluded)
domain_allowlist: ["arithmetic", "number_theory"]
function_allowlist: ["is_prime", "fibonacci", "add", "multiply"]
function_denylist: ["deprecated_function"]  # Exclude specific functions

# Performance
cache_strategy: "smart"
cache_size: 1000
computation_timeout: 30.0
max_concurrent_calls: 10
# Use configuration file
chuk-mcp-math-server --config config.yaml

# Save current config
chuk-mcp-math-server --domains arithmetic --save-config my-config.yaml

# Show current config
chuk-mcp-math-server --show-config

MCP Resources

The server provides built-in resources for introspection:

# List available functions (via MCP resource)
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "resources/read",
  "params": {
    "uri": "math://available-functions"
  }
}

# Get function statistics
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "resources/read",
  "params": {
    "uri": "math://function-stats"
  }
}

# Get server configuration
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "resources/read",
  "params": {
    "uri": "math://server-config"
  }
}

šŸ› ļø Development

Project Structure

chuk-mcp-math-server/
ā”œā”€ā”€ src/chuk_mcp_math_server/
│   ā”œā”€ā”€ __init__.py              # Package initialization
│   ā”œā”€ā”€ cli.py                   # CLI implementation
│   ā”œā”€ā”€ config.py                # Base configuration (Pydantic)
│   ā”œā”€ā”€ math_config.py           # Math-specific configuration
│   ā”œā”€ā”€ function_filter.py       # Function filtering logic
│   └── math_server.py           # Main server (uses chuk-mcp-server)
ā”œā”€ā”€ tests/                       # Test suite (97% coverage, 114 tests)
ā”œā”€ā”€ pyproject.toml              # Project configuration
└── README.md                   # This file

Development Setup

# Clone the repository
git clone https://github.com/chuk-mcp/chuk-mcp-math-server.git
cd chuk-mcp-math-server

# Install development dependencies
uv sync

# Install in editable mode
uv pip install -e ".[dev]"

Running Tests

# Run tests
make test

# Run tests with coverage
make test-cov

# Run specific test file
uv run pytest tests/test_config.py -v

Code Quality

# Run all quality checks (lint, typecheck, security, tests)
make check

# Format code
make format

# Run linting
make lint

# Run type checking
make typecheck

# Run security checks
make security

Building

# Build distribution packages
make build

# This creates wheel and source distributions in dist/

Running Locally

# Run with verbose logging
uv run chuk-mcp-math-server --verbose

# Run HTTP server
make run-http

# Run STDIO server (default)
make run

Custom Server

from chuk_mcp_math_server import create_math_server

# Create server with custom configuration
server = create_math_server(
    transport="http",
    port=9000,
    domain_allowlist=["arithmetic"],  # Only arithmetic functions
    function_denylist=["deprecated_func"],  # Exclude specific functions
    log_level="DEBUG"
)

# Run the server
server.run()

šŸš€ Deployment

Docker

Build and run with Docker:

# Build the Docker image
make docker-build

# Run the container
make docker-run

# Or manually:
docker build -t chuk-mcp-math-server .
docker run -p 8000:8000 chuk-mcp-math-server

The server will be available at http://localhost:8000.

Fly.io

Deploy to Fly.io for a public server:

# Install flyctl if you haven't already
curl -L https://fly.io/install.sh | sh

# Login to Fly.io
flyctl auth login

# Deploy (first time)
flyctl launch

# Or deploy updates
flyctl deploy

# Check status
flyctl status

# View logs
flyctl logs

The fly.toml configuration is already set up for HTTP mode on port 8000. The server will auto-scale based on traffic (min 0, auto-start/stop).

Environment Variables

Configure via Fly.io secrets:

# Set environment variables
flyctl secrets set MCP_SERVER_LOG_LEVEL=INFO
flyctl secrets set MCP_MATH_CACHE_STRATEGY=smart

# View secrets
flyctl secrets list

GitHub Actions

The repository includes automated workflows:

  • Test: Runs on all PRs and commits (Ubuntu, Windows, macOS)

  • Release: Creates GitHub releases when tags are pushed

  • Publish: Publishes to PyPI automatically on releases

  • Fly Deploy: Auto-deploys to Fly.io on main branch pushes

To create a release:

# Bump version in pyproject.toml
make bump-patch  # or bump-minor, bump-major

# Commit the version change
git add pyproject.toml uv.lock
git commit -m "Bump version to 0.2.1"
git push

# Create and push a tag to trigger release
make publish

This will automatically:

  1. Create a GitHub release with changelog

  2. Run tests on all platforms

  3. Build and publish to PyPI

  4. Deploy to Fly.io (if configured)

šŸ“Š Performance

Benchmarks

  • Peak Throughput: 36,000+ requests/second

  • Average Latency: <3ms per tool call

  • Startup Time: ~2 seconds (642 functions loaded)

  • Memory Usage: ~50MB baseline

  • Success Rate: 100% under load testing

Performance comes from:

  • chuk-mcp-server framework: High-performance MCP implementation

  • Async operations: Non-blocking I/O for all function calls

  • Type safety: Automatic schema validation with zero overhead

  • Optimized registry: Fast function lookup and execution

Optimization Tips

  • Use function filtering to reduce memory footprint

  • Enable caching for repeated calculations (--cache-strategy smart)

  • Use HTTP transport for web APIs, STDIO for local/Claude Desktop

  • Adjust --max-concurrent-calls for high-throughput scenarios

šŸ”§ Troubleshooting

Common Issues

Server Won't Start

# Verify installation
python -c "import chuk_mcp_math_server; print(chuk_mcp_math_server.__version__)"

# Verify configuration
chuk-mcp-math-server --show-config

# Debug mode
chuk-mcp-math-server --verbose

Functions Not Loading

# Check if chuk-mcp-math is installed
python -c "import chuk_mcp_math; print(chuk_mcp_math.__version__)"

# Verify function count
chuk-mcp-math-server --show-config | grep total_filtered

Claude Desktop Not Showing Tools

  1. Use absolute paths in claude_desktop_config.json (not ~ or relative)

  2. Test manually: echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | uv run chuk-mcp-math-server

  3. Restart Claude Desktop after config changes

  4. Check Claude Desktop logs (Help → Show Logs)

HTTP Connection Issues

# Test server health
curl http://localhost:8000/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'

🌐 Public Server

A free public math server is available at https://math.chukai.io/mcp for anyone to use!

Features

  • āœ… Always Available: Hosted on Fly.io with auto-scaling

  • āœ… Always Up-to-Date: Automatically deploys from main branch

  • āœ… All 642 Functions: Full mathematical function library

  • āœ… No Installation Required: Just add to Claude Desktop config

  • āœ… Free to Use: No authentication or API keys needed

Quick Start

Add this to your Claude Desktop config:

{
  "mcpServers": {
    "math": {
      "command": "uvx",
      "args": [
        "chuk-mcp-client",
        "https://math.chukai.io/mcp"
      ]
    }
  }
}

Then restart Claude Desktop and ask: "Can you check if 97 is prime?"

Testing the Public Server

The server requires session management for MCP over HTTP. Use chuk-mcp-client to connect:

# Install the client
uvx chuk-mcp-client https://math.chukai.io/mcp

# Or test with curl (requires session ID from chuk-mcp-server)
curl https://math.chukai.io/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'

Note: The server uses chuk-mcp-server's session-based HTTP transport, which requires the chuk-mcp-client for proper session management.

Privacy & Usage

  • No logging of tool calls or personal data

  • No rate limiting (fair use applies)

  • Automatically scales based on demand

  • Source code is open and auditable

Self-Hosting

Want to host your own? See the Deployment section above for Docker and Fly.io instructions.

šŸ¤ Contributing

We welcome contributions! Here's how to help:

  1. Fork the repository

  2. Create a feature branch (git checkout -b feature/amazing-feature)

  3. Make your changes

  4. Add tests if applicable

  5. Ensure tests pass (pytest)

  6. Submit a pull request

Code Style

  • Follow PEP 8 guidelines

  • Maintain 100% type safety with mypy and Pydantic

  • Add type hints where appropriate

  • Update documentation for new features

  • Keep the README up to date

  • Aim for high test coverage (currently 97%)

šŸ“‹ Requirements

Core Dependencies

  • Python 3.11+

  • chuk-mcp-server >= 0.6 (provides high-performance MCP framework)

  • chuk-mcp-math >= 0.1.0 (provides mathematical functions)

  • pyyaml >= 6.0.2 (for YAML configuration)

What's Included via chuk-mcp-server

  • High-performance HTTP/STDIO transport

  • Automatic type inference and validation

  • Built-in logging and error handling

  • Zero-config startup capability

  • Production-grade performance (36K+ RPS)

Optional Dependencies

  • Development tools: pytest, pytest-asyncio

  • All optional: pip install -e .[dev]

šŸ—ļø Architecture

Built on chuk-mcp-server framework:

  • chuk-mcp-server: High-performance MCP server framework (36K+ RPS)

  • chuk-mcp-math: Mathematical function library (642 functions)

  • This server: Bridges the two with filtering and configuration

The refactored architecture is simpler and more performant:

  • Removed custom base server implementation

  • Uses chuk-mcp-server's decorator-based API

  • Maintains all filtering and configuration features

  • Gains automatic performance optimization

šŸ“ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

šŸ™ Acknowledgments


High-performance mathematical computation for the Model Context Protocol ecosystem

Available Tools

641 tools
abs_valueA

Calculate the absolute value of a number. (Domain: arithmetic, Category: core)

Inputs: x (required).

acosC

Calculate arccosine (inverse cosine) with domain validation. (Domain: trigonometry, Category: inverse_functions)

Inputs: value (required).

acos_degreesC

Calculate arccosine with result in degrees. (Domain: trigonometry, Category: inverse_functions)

Inputs: value (required).

acoshC

Calculate inverse hyperbolic cosine (area cosine) with domain validation. (Domain: trigonometry, Category: inverse_hyperbolic)

Inputs: x (required).

acotC

Calculate arccotangent (inverse cotangent). (Domain: trigonometry, Category: inverse_functions)

Inputs: value (required).

acothC

Calculate inverse hyperbolic cotangent with domain validation. (Domain: trigonometry, Category: inverse_hyperbolic)

Inputs: x (required).

acscC

Calculate arccosecant (inverse cosecant). (Domain: trigonometry, Category: inverse_functions)

Inputs: value (required).

acschB

Calculate inverse hyperbolic cosecant with domain validation. (Domain: trigonometry, Category: inverse_hyperbolic)

Inputs: x (required).

adam_optimizerC

Perform Adam optimization (adaptive moment estimation) for efficient training (Domain: numerical, Category: optimization)

Inputs: f (required), grad_f (required), x0 (required), learning_rate, +5 more.

addB

Add two numbers together. Pure arithmetic addition operation. (Domain: arithmetic, Category: core)

Inputs: a (required), b (required).

add_in_baseC

Add two numbers in a specified base. (Domain: arithmetic, Category: number_systems)

Inputs: num1 (required), num2 (required), base (required).

aks_primality_testC

AKS primality test - first deterministic polynomial-time algorithm. (Domain: arithmetic, Category: advanced_primality)

Inputs: n (required).

aliquot_sequence_analysisC

Analyze aliquot sequence starting from n. (Domain: arithmetic, Category: special_numbers)

Inputs: n (required), max_steps.

all_primitive_rootsC

Find all primitive roots modulo n. (Domain: arithmetic, Category: modular_arithmetic)

Inputs: n (required).

amplitude_from_coefficientsC

Extract amplitude from trigonometric coefficients Acos(Īø) + Bsin(Īø). (Domain: trigonometry, Category: wave_analysis)

Inputs: a_coeff (required), b_coeff (required).

angle_differenceC

Calculate the shortest angular difference between two angles. (Domain: trigonometry, Category: angle_conversion)

Inputs: angle1 (required), angle2 (required), unit.

angle_propertiesC

Get angle properties and equivalent representations. (Domain: trigonometry, Category: angle_conversion)

Inputs: angle (required), unit.

angular_velocity_from_period_or_frequencyC

Calculate the angular velocity from period or frequency. (Domain: trigonometry, Category: angle_conversion)

Inputs: period, frequency, unit.

anova_one_wayC

Perform one-way ANOVA (Analysis of Variance) to test whether means of multiple groups differ significantly (Domain: statistics, Category: inference)

Inputs: groups (required), alpha.

aperyA

Get ApĆ©ry's constant ζ(3) ā‰ˆ 1.20206. Sum of cubes reciprocals: 1 + 1/8 + 1/27 + ... (Domain: arithmetic, Category: general)

Inputs: no named parameters.

apply_mobius_inversionC

Apply Mƶbius inversion to a function defined by a formula. (Domain: arithmetic, Category: mobius_functions)

Inputs: formula (required), n (required), description.

approximately_equalC

Check if two floating-point numbers are approximately equal within a tolerance. Handles floating-point precision issues. (Domain: arithmetic, Category: comparison)

Inputs: a (required), b (required), tolerance.

approximation_errorC

Calculate approximation error for various pi algorithms. (Domain: arithmetic, Category: mathematical_constants)

Inputs: method (required), terms (required).

arabic_to_romanB

Convert an Arabic number to Roman numeral representation. (Domain: arithmetic, Category: general)

Inputs: number (required).

arithmetic_sequenceC

Generate an arithmetic sequence with given first term, common difference, and number of terms. (Domain: arithmetic, Category: general)

Inputs: first_term (required), common_diff (required), num_terms (required).

arithmetic_seriesC

Compute arithmetic series sum of terms in arithmetic progression (Domain: numerical, Category: series)

Inputs: a (required), d (required), n (required).

arithmetic_sumC

Calculate the sum of an arithmetic sequence using the formula: n/2 * (2a + (n-1)d). (Domain: arithmetic, Category: general)

Inputs: first_term (required), common_diff (required), num_terms (required).

armstrong_numbersC

Find all Armstrong numbers (narcissistic numbers) up to limit. (Domain: arithmetic, Category: special_numbers)

Inputs: limit (required).

asecC

Calculate arcsecant (inverse secant). (Domain: trigonometry, Category: inverse_functions)

Inputs: value (required).

asechB

Calculate inverse hyperbolic secant with domain validation. (Domain: trigonometry, Category: inverse_hyperbolic)

Inputs: x (required).

asinC

Calculate arcsine (inverse sine) with domain validation. (Domain: trigonometry, Category: inverse_functions)

Inputs: value (required).

asin_degreesC

Calculate arcsine with result in degrees. (Domain: trigonometry, Category: inverse_functions)

Inputs: value (required).

asinhC

Calculate inverse hyperbolic sine (area sine). (Domain: trigonometry, Category: inverse_hyperbolic)

Inputs: x (required).

atanC

Calculate arctangent (inverse tangent). (Domain: trigonometry, Category: inverse_functions)

Inputs: value (required).

atan2C

Calculate two-argument arctangent for full quadrant determination. (Domain: trigonometry, Category: inverse_functions)

Inputs: y (required), x (required).

atan2_degreesB

Calculate two-argument arctangent with result in degrees. (Domain: trigonometry, Category: inverse_functions)

Inputs: y (required), x (required).

atan_degreesB

Calculate arctangent with result in degrees. (Domain: trigonometry, Category: inverse_functions)

Inputs: value (required).

atanhB

Calculate inverse hyperbolic tangent with domain validation. (Domain: trigonometry, Category: inverse_hyperbolic)

Inputs: x (required).

autocorrelationC

Compute autocorrelation at a given lag - measures correlation between series and itself shifted by lag periods (Domain: timeseries, Category: analysis)

Inputs: data (required), lag (required).

automorphic_numbersC

Find all automorphic numbers up to a limit. (Domain: arithmetic, Category: digital_operations)

Inputs: limit (required).

baby_step_giant_stepC

Solve discrete logarithm using Baby-step Giant-step algorithm. (Domain: arithmetic, Category: modular_arithmetic)

Inputs: g (required), h (required), n (required).

base_conversionC

Convert a number from any base to any other base (2-36). (Domain: arithmetic, Category: number_systems)

Inputs: number (required), from_base (required), to_base (required).

base_to_decimalC

Convert a number from a specified base (2-36) to decimal. (Domain: arithmetic, Category: general)

Inputs: number (required), base (required).

base_to_numberC

Convert a base representation string to decimal number. (Domain: arithmetic, Category: digital_operations)

Inputs: digits (required), base (required).

bearing_calculationC

Calculate bearing (compass direction) from one point to another. (Domain: trigonometry, Category: applications)

Inputs: lat1 (required), lon1 (required), lat2 (required), lon2 (required).

beat_frequency_analysisC

Analyze beat frequency from two interfering waves. (Domain: trigonometry, Category: wave_analysis)

Inputs: freq1 (required), freq2 (required).

bell_numberA

Calculate the nth Bell number B_n (number of partitions of a set). (Domain: arithmetic, Category: combinatorial_numbers)

Inputs: n (required).

bell_sequenceC

Generate the first n Bell numbers. (Domain: arithmetic, Category: combinatorial_numbers)

Inputs: n (required).

bell_triangleC

Generate Bell's triangle up to row n. (Domain: arithmetic, Category: combinatorial_numbers)

Inputs: n (required).

bertrand_postulate_verifyC

Verify Bertrand's postulate for given n. (Domain: arithmetic, Category: prime_conjectures)

Inputs: n (required).

best_approximation_fareyC

Find best rational approximation using Farey sequences. (Domain: arithmetic, Category: farey_sequences)

Inputs: target (required), max_denom (required).

best_rational_approximationC

Find best rational approximation to x with denominator ≤ max_denom. (Domain: arithmetic, Category: continued_fractions)

Inputs: x (required), max_denom (required).

betweenA

Check if a value is between two bounds (exclusive by default, like mathematical interval notation). (Domain: arithmetic, Category: comparison)

Inputs: value (required), lower (required), upper (required).

bezout_applicationsD

Applications of BƩzout's identity in various mathematical contexts. (Domain: arithmetic, Category: bezout_identity)

Inputs: a (required), b (required), applications.

bezout_identityB

Find BƩzout coefficients: integers x, y such that ax + by = gcd(a, b). (Domain: arithmetic, Category: bezout_identity)

Inputs: a (required), b (required).

big_omegaB

Calculate Ī©(n) - total number of prime factors (with multiplicity). (Domain: arithmetic, Category: arithmetic_functions)

Inputs: n (required).

bilinear_interpolateC

Perform bilinear interpolation for 2D grid data (Domain: numerical, Category: interpolation)

Inputs: x (required), y (required), x1 (required), x2 (required), +6 more.

binary_remainder_egyptianC

Binary remainder method for Egyptian fraction decomposition. (Domain: arithmetic, Category: egyptian_fractions)

Inputs: numerator (required), denominator (required).

binary_to_decimalC

Convert a binary number (base-2) to decimal (base-10). (Domain: arithmetic, Category: number_systems)

Inputs: binary_str (required).

binet_formulaC

Calculate Binet-style formula for sequence using characteristic roots. (Domain: arithmetic, Category: recursive_sequences)

Inputs: coeffs (required), initial (required), n (required).

binomial_cdfC

Calculate the cumulative distribution function (CDF) of the binomial distribution (Domain: probability, Category: general)

Inputs: k (required), n (required), p (required).

binomial_pmfC

Calculate the probability mass function (PMF) of the binomial distribution (Domain: probability, Category: general)

Inputs: k (required), n (required), p (required).

binomial_sampleC

Generate random samples from the binomial distribution (Domain: probability, Category: general)

Inputs: num_samples (required), n (required), p (required), seed.

binomial_seriesC

Compute binomial series expansion (1+x)^n (Domain: numerical, Category: series)

Inputs: x (required), alpha (required), n (required).

bootstrap_confidence_intervalC

Calculate bootstrap confidence interval for a statistic (mean or median) using resampling (Domain: statistics, Category: inference)

Inputs: data (required), statistic_func, n_bootstrap, confidence_level.

calendar_approximationsC

Find calendar approximations using continued fractions. (Domain: arithmetic, Category: continued_fractions)

Inputs: year_length (required).

calkin_wilf_treeC

Generate levels of Calkin-Wilf tree related to Farey sequences. (Domain: arithmetic, Category: farey_sequences)

Inputs: levels (required).

carmichael_lambdaC

Calculate the Carmichael function Ī»(n) - exponent of multiplicative group mod n. (Domain: arithmetic, Category: arithmetic_functions)

Inputs: n (required).

carmichael_number_testC

Test if a number is a Carmichael number (pseudoprime to all bases). (Domain: arithmetic, Category: advanced_primality)

Inputs: n (required).

catalanA

Get Catalan's constant G ā‰ˆ 0.91597. Sum of alternating series 1 - 1/9 + 1/25 - 1/49 + ... (Domain: arithmetic, Category: general)

Inputs: no named parameters.

catalan_numberC

Calculate the nth Catalan number C_n = (2n)!/(n+1)!n!. (Domain: arithmetic, Category: combinatorial_numbers)

Inputs: n (required).

catalan_sequenceC

Generate the first n Catalan numbers. (Domain: arithmetic, Category: combinatorial_numbers)

Inputs: n (required).

catenary_curveC

Calculate catenary curve parameters and properties. (Domain: trigonometry, Category: hyperbolic)

Inputs: a (required), x (required).

cbrt2B

Get āˆ›2 ā‰ˆ 1.25992. Cube root of 2, edge length of cube with volume 2. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

cbrt3A

Get āˆ›3 ā‰ˆ 1.44225. Cube root of 3, edge length of cube with volume 3. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

ceilA

Return the ceiling of a number (smallest integer greater than or equal to x). (Domain: arithmetic, Category: core)

Inputs: x (required).

ceiling_multipleA

Round a number up to the nearest multiple of significance. Always rounds away from zero. (Domain: arithmetic, Category: general)

Inputs: number (required), significance (required).

centered_hexagonal_numberC

Calculate the nth centered hexagonal number. (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required).

centered_polygonal_numberC

Calculate the nth centered s-gonal number. (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required), s (required).

centered_square_numberC

Calculate the nth centered square number. (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required).

centered_triangular_numberC

Calculate the nth centered triangular number. (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required).

cf_convergence_analysisC

Analyze convergence properties of continued fraction approximations. (Domain: arithmetic, Category: continued_fractions)

Inputs: x (required), max_terms.

cf_solve_pellC

Solve Pell's equation x² - ny² = 1 using continued fractions. (Domain: arithmetic, Category: continued_fractions)

Inputs: n (required).

cf_to_rationalC

Convert continued fraction to rational number. (Domain: arithmetic, Category: continued_fractions)

Inputs: cf (required).

characteristic_polynomialC

Find characteristic polynomial of linear recurrence relation. (Domain: arithmetic, Category: recursive_sequences)

Inputs: coeffs (required).

chebyshev_normC

Calculate the Chebyshev norm (Lāˆž norm) of a vector (Domain: linear_algebra.vectors, Category: general)

Inputs: vector (required).

chi_square_testC

Perform chi-square goodness-of-fit test to test whether observed frequencies match expected frequencies (Domain: statistics, Category: inference)

Inputs: observed (required), expected (required), alpha.

circle_tangencyC

Check tangency relationship between two Ford circles. (Domain: arithmetic, Category: farey_sequences)

Inputs: p1 (required), q1 (required), p2 (required), q2 (required).

clampB

Clamp a value between a minimum and maximum bound. Ensures the value stays within specified limits. (Domain: arithmetic, Category: comparison)

Inputs: value (required), min_val (required), max_val (required).

close_to_zeroB

Check if a number is close to zero within a tolerance. Useful for floating-point comparisons. (Domain: arithmetic, Category: comparison)

Inputs: x (required), tolerance.

cohens_dC

Calculate Cohen's d effect size for two samples (standardized difference between two means) (Domain: statistics, Category: inference)

Inputs: data1 (required), data2 (required).

collatz_max_valueC

Find the maximum value reached in the Collatz sequence. (Domain: arithmetic, Category: iterative_sequences)

Inputs: n (required).

collatz_sequenceB

Generate the Collatz sequence (3n+1 problem) starting from n until reaching 1. (Domain: arithmetic, Category: iterative_sequences)

Inputs: n (required).

collatz_stopping_timeC

Calculate the Collatz stopping time (number of steps to reach 1). (Domain: arithmetic, Category: iterative_sequences)

Inputs: n (required).

comprehensive_identity_verificationD

Generate a comprehensive identity verification report. (Domain: trigonometry, Category: identities)

Inputs: test_angles, tolerance.

comprehensive_statsC

Calculate comprehensive statistics for a dataset including mean, median, mode, variance, and more. (Domain: statistics, Category: general)

Inputs: numbers (required).

compute_e_limitC

Compute e using the limit definition: e = lim(nā†’āˆž) (1 + 1/n)^n (Domain: arithmetic, Category: mathematical_constants)

Inputs: n (required).

compute_e_seriesC

Compute e using the infinite series: e = 1 + 1/1! + 1/2! + 1/3! + ... (Domain: arithmetic, Category: mathematical_constants)

Inputs: terms (required).

compute_euler_gamma_harmonicC

Compute Euler-Mascheroni constant γ using harmonic series: γ = lim(nā†’āˆž) (H_n - ln(n)) (Domain: arithmetic, Category: mathematical_constants)

Inputs: terms (required).

compute_golden_ratio_continued_fractionC

Compute golden ratio using continued fraction: φ = 1 + 1/(1 + 1/(1 + 1/...)) (Domain: arithmetic, Category: mathematical_constants)

Inputs: depth (required).

compute_golden_ratio_fibonacciC

Compute golden ratio using Fibonacci sequence: φ = lim(nā†’āˆž) F(n+1)/F(n) (Domain: arithmetic, Category: mathematical_constants)

Inputs: terms (required).

compute_pi_chudnovskyC

Compute pi using Chudnovsky algorithm (extremely fast convergence). (Domain: arithmetic, Category: mathematical_constants)

Inputs: terms (required).

compute_pi_leibnizC

Compute pi using the Leibniz formula: π/4 = 1 - 1/3 + 1/5 - 1/7 + ... (Domain: arithmetic, Category: mathematical_constants)

Inputs: terms (required).

compute_pi_machinC

Compute pi using Machin's formula: Ļ€/4 = 4Ɨarctan(1/5) - arctan(1/239) (Domain: arithmetic, Category: mathematical_constants)

Inputs: terms (required).

compute_pi_nilakanthaC

Compute pi using the Nilakantha series: Ļ€ = 3 + 4/(2Ɨ3Ɨ4) - 4/(4Ɨ5Ɨ6) + 4/(6Ɨ7Ɨ8) - ... (Domain: arithmetic, Category: mathematical_constants)

Inputs: terms (required).

confidence_interval_meanC

Calculate confidence interval for population mean from sample data (Domain: statistics, Category: inference)

Inputs: data (required), confidence_level.

confidence_interval_proportionC

Calculate confidence interval for population proportion from sample proportion (Domain: statistics, Category: inference)

Inputs: successes (required), n (required), confidence_level.

constant_relationshipsC

Calculate mathematical constant relationships and identities. (Domain: arithmetic, Category: mathematical_constants)

Inputs: identity (required).

continued_fraction_eB

Generate continued fraction representation of e: [2; 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, ...] (Domain: arithmetic, Category: mathematical_constants)

Inputs: depth (required).

continued_fraction_expansionC

Compute continued fraction expansion of a real number. (Domain: arithmetic, Category: continued_fractions)

Inputs: x (required), max_terms, tolerance.

continued_fraction_golden_ratioC

Generate continued fraction representation of golden ratio: [1; 1, 1, 1, 1, 1, ...] (Domain: arithmetic, Category: mathematical_constants)

Inputs: depth (required).

continued_fraction_piC

Generate continued fraction representation of pi: [3; 7, 15, 1, 292, 1, 1, ...] (Domain: arithmetic, Category: mathematical_constants)

Inputs: depth (required).

convergence_comparisonC

Compare convergence rates of different pi approximation methods. (Domain: arithmetic, Category: mathematical_constants)

Inputs: max_terms (required).

convergent_propertiesC

Analyze properties of continued fraction convergents. (Domain: arithmetic, Category: continued_fractions)

Inputs: cf (required), target.

convergents_sequenceC

Generate sequence of convergents for a continued fraction. (Domain: arithmetic, Category: continued_fractions)

Inputs: cf (required).

convert_angleC

Convert between different angle units in one operation. (Domain: trigonometry, Category: angle_conversion)

Inputs: angle (required), from_unit (required), to_unit (required).

convert_areaB

Convert area between different units: square meters, square feet, acres, hectares, etc. (Domain: conversions, Category: general)

Inputs: value (required), from_unit (required), to_unit (required).

convert_lengthC

Convert length between different units: meters, feet, inches, kilometers, miles, etc. (Domain: conversions, Category: general)

Inputs: value (required), from_unit (required), to_unit (required).

convert_speedC

Convert speed between different units: mph, kph, m/s, knots, etc. (Domain: conversions, Category: general)

Inputs: value (required), from_unit (required), to_unit (required).

convert_temperatureC

Convert temperature between Celsius, Fahrenheit, and Kelvin scales with validation and formulas. (Domain: conversions, Category: general)

Inputs: value (required), from_scale (required), to_scale (required).

convert_timeC

Convert time between different units: seconds, minutes, hours, days, weeks, years, etc. (Domain: conversions, Category: general)

Inputs: value (required), from_unit (required), to_unit (required).

convert_volumeC

Convert volume between different units: liters, gallons, cubic meters, cubic feet, etc. (Domain: conversions, Category: general)

Inputs: value (required), from_unit (required), to_unit (required).

convert_weightC

Convert weight/mass between different units: kilograms, pounds, ounces, grams, etc. (Domain: conversions, Category: general)

Inputs: value (required), from_unit (required), to_unit (required).

coordinate_descentC

Perform coordinate descent optimization by optimizing one variable at a time (Domain: numerical, Category: optimization)

Inputs: f (required), x0 (required), step_size, max_iterations, +1 more.

correlationC

Calculate the Pearson correlation coefficient between two datasets (ranges from -1 to 1) (Domain: statistics, Category: general)

Inputs: xs (required), ys (required).

cosB

Calculate cosine of an angle in radians with high precision. (Domain: trigonometry, Category: basic_functions)

Inputs: angle (required).

cos_degreesC

Calculate cosine of an angle in degrees. (Domain: trigonometry, Category: basic_functions)

Inputs: angle_degrees (required).

coshB

Calculate hyperbolic cosine with numerical stability. (Domain: trigonometry, Category: hyperbolic)

Inputs: x (required).

cos_seriesC

Compute cosine function using Taylor series expansion (Domain: numerical, Category: series)

Inputs: x (required), n (required).

cotB

Calculate cotangent (1/tan) of an angle in radians. (Domain: trigonometry, Category: basic_functions)

Inputs: angle (required).

cothA

Calculate hyperbolic cotangent (1/tanh) with singularity handling. (Domain: trigonometry, Category: hyperbolic)

Inputs: x (required).

count_solutions_diophantineC

Count integer solutions to ax + by = c within given bounds. (Domain: arithmetic, Category: diophantine_equations)

Inputs: a (required), b (required), c (required), x_min (required), +3 more.

cousin_primesA

Find all cousin prime pairs (primes differing by 4) up to limit. (Domain: arithmetic, Category: prime_patterns)

Inputs: limit (required).

covarianceC

Calculate the covariance between two datasets (measures how variables change together) (Domain: statistics, Category: general)

Inputs: xs (required), ys (required), population.

cross_productC

Calculate the cross product of two 3D vectors (Domain: linear_algebra.vectors, Category: general)

Inputs: vector_a (required), vector_b (required).

crt_solveC

Solve system of congruences using Chinese Remainder Theorem. (Domain: arithmetic, Category: modular_arithmetic)

Inputs: remainders (required), moduli (required).

cscB

Calculate cosecant (1/sin) of an angle in radians. (Domain: trigonometry, Category: basic_functions)

Inputs: angle (required).

cschA

Calculate hyperbolic cosecant (1/sinh) with singularity handling. (Domain: trigonometry, Category: hyperbolic)

Inputs: x (required).

cube_numbersA

Generate the first n cube numbers (1, 8, 27, 64, 125, ...). nth cube number = n³. (Domain: arithmetic, Category: general)

Inputs: n (required).

cubic_spline_coefficientsC

Compute cubic spline coefficients for smooth interpolation (Domain: numerical, Category: interpolation)

Inputs: x_points (required), y_points (required).

cubic_spline_interpolateC

Perform cubic spline interpolation for smooth curve fitting (Domain: numerical, Category: interpolation)

Inputs: x_points (required), y_points (required), x (required).

decimal_to_baseC

Convert a decimal number to its representation in another base (2-36). (Domain: arithmetic, Category: general)

Inputs: number (required), base (required).

decimal_to_binaryA

Convert a decimal number (base-10) to binary (base-2). (Domain: arithmetic, Category: number_systems)

Inputs: decimal (required).

decimal_to_hexadecimalC

Convert decimal to hexadecimal (base-16) number system. (Domain: arithmetic, Category: number_systems)

Inputs: decimal (required).

decimal_to_octalC

Convert decimal to octal (base-8) number system. (Domain: arithmetic, Category: number_systems)

Inputs: decimal (required).

degrees_to_gradiansB

Convert degrees to gradians. (Domain: trigonometry, Category: angle_conversion)

Inputs: degrees (required).

degrees_to_radiansC

Convert degrees to radians with high precision. (Domain: trigonometry, Category: angle_conversion)

Inputs: degrees (required).

density_analysisC

Analyze density of Farey sequences as n increases. (Domain: arithmetic, Category: farey_sequences)

Inputs: max_n (required).

derivative_backwardC

Calculate numeric derivative using backward difference method (Domain: calculus, Category: general)

Inputs: func (required), x (required), h.

derivative_centralC

Calculate numeric derivative using central difference method (most accurate) (Domain: calculus, Category: general)

Inputs: func (required), x (required), h.

derivative_forwardC

Calculate numeric derivative using forward difference method (Domain: calculus, Category: general)

Inputs: func (required), x (required), h.

deseasonalizeC

Remove seasonal component from time series (Domain: timeseries, Category: analysis)

Inputs: data (required), period (required).

detect_outliersC

Detect outliers in a dataset using z-score or IQR method (Domain: statistics, Category: general)

Inputs: numbers (required), method, threshold.

detect_seasonalityC

Detect seasonal patterns in time series data (Domain: timeseries, Category: analysis)

Inputs: data (required), max_period.

detect_trendC

Detect and quantify trend in time series using linear regression (Domain: timeseries, Category: analysis)

Inputs: data (required).

deterministic_miller_rabinC

Deterministic Miller-Rabin test using known witnesses for specific ranges. (Domain: arithmetic, Category: advanced_primality)

Inputs: n (required).

detrendC

Remove trend from time series to obtain stationary residuals (Domain: timeseries, Category: analysis)

Inputs: data (required).

differencingC

Apply differencing to make time series stationary (Domain: timeseries, Category: analysis)

Inputs: data (required), lag.

digital_persistenceC

Calculate digital persistence (number of steps to reach single digit). (Domain: arithmetic, Category: special_numbers)

Inputs: n (required), operation.

digital_product_sequenceC

Generate sequence by repeatedly applying digital product until single digit or zero. (Domain: arithmetic, Category: iterative_sequences)

Inputs: n (required).

digital_rootB

Calculate the digital root (single digit obtained by repeatedly summing digits). (Domain: arithmetic, Category: digital_operations)

Inputs: n (required), base.

digital_sum_sequenceC

Generate sequence by repeatedly applying digital sum until single digit. (Domain: arithmetic, Category: iterative_sequences)

Inputs: n (required).

digit_countC

Count the number of digits in a number for given base. (Domain: arithmetic, Category: digital_operations)

Inputs: n (required), base.

digit_frequencyC

Count frequency of each digit in a number. (Domain: arithmetic, Category: digital_operations)

Inputs: n (required), base.

digit_productC

Calculate the product of digits of a number. (Domain: arithmetic, Category: digital_operations)

Inputs: n (required), base.

digit_reversalC

Reverse the digits of a number. (Domain: arithmetic, Category: digital_operations)

Inputs: n (required).

digit_sortC

Sort the digits of a number in ascending or descending order. (Domain: arithmetic, Category: digital_operations)

Inputs: n (required), descending.

digit_sumC

Calculate the sum of digits of a number in given base. (Domain: arithmetic, Category: digital_operations)

Inputs: n (required), base.

diophantine_analysisD

Analyze a Diophantine equation and provide general information. (Domain: arithmetic, Category: diophantine_equations)

Inputs: equation_type (required), kwargs (required).

discrete_log_naiveC

Solve discrete logarithm g^x ≔ h (mod n) using naive method. (Domain: arithmetic, Category: modular_arithmetic)

Inputs: g (required), h (required), n (required), max_exp.

distance_haversineC

Calculate great circle distance between two points using Haversine formula. (Domain: trigonometry, Category: applications)

Inputs: lat1 (required), lon1 (required), lat2 (required), lon2 (required), +1 more.

distinct_partitionsC

Count partitions of n into distinct parts (no repeated values). (Domain: arithmetic, Category: partitions)

Inputs: n (required).

divideC

Divide the first number by the second number. (Domain: arithmetic, Category: core)

Inputs: a (required), b (required).

divisor_countB

Count the number of positive divisors of a number (divisor function Ļ„(n)). (Domain: arithmetic, Category: number_theory)

Inputs: n (required).

divisor_function_inversionC

Analyze divisor functions using Mƶbius inversion techniques. (Domain: arithmetic, Category: mobius_functions)

Inputs: n (required), function_type, power.

divisor_power_sumC

Calculate σ_k(n) - sum of kth powers of divisors. (Domain: arithmetic, Category: arithmetic_functions)

Inputs: n (required), k (required).

divisorsA

Find all positive divisors of a number in sorted order. (Domain: arithmetic, Category: number_theory)

Inputs: n (required).

divisor_sumB

Calculate the sum of all positive divisors of a number (divisor function σ(n)). (Domain: arithmetic, Category: number_theory)

Inputs: n (required).

divmod_operationB

Perform division and return both quotient and remainder. Returns (quotient, remainder). (Domain: arithmetic, Category: core)

Inputs: a (required), b (required).

dodecahedral_numberC

Calculate the nth dodecahedral number. (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required).

dot_productC

Calculate the dot product of two vectors (inner product) (Domain: linear_algebra.vectors, Category: general)

Inputs: vector_a (required), vector_b (required).

double_angle_formulasC

Calculate trigonometric functions using double angle formulas. (Domain: trigonometry, Category: identities)

Inputs: angle (required), function.

double_factorialC

Calculate the double factorial of a number. n!! = n Ɨ (n-2) Ɨ (n-4) Ɨ ... Ɨ 2 or 1. (Domain: arithmetic, Category: general)

Inputs: n (required).

dudeney_numbersC

Find all Dudeney numbers up to limit. (Domain: arithmetic, Category: special_numbers)

Inputs: limit (required).

eA

Get Euler's number e ā‰ˆ 2.71828. Base of natural logarithm and fundamental constant in calculus. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

e_continued_fractionC

Generate continued fraction expansion of e (Euler's number). (Domain: arithmetic, Category: continued_fractions)

Inputs: terms (required).

e_digitsC

Generate e digits to specified precision using high-precision arithmetic. (Domain: arithmetic, Category: mathematical_constants)

Inputs: precision (required).

effect_size_rC

Convert t-statistic to effect size r (correlation coefficient) (Domain: statistics, Category: inference)

Inputs: t_statistic (required), df (required).

egyptian_expansion_lengthsC

Calculate the length of Egyptian fraction expansion for fractions 1/n. (Domain: arithmetic, Category: egyptian_fractions)

Inputs: max_n (required).

egyptian_fraction_decompositionC

Decompose a fraction into Egyptian fractions using greedy algorithm. (Domain: arithmetic, Category: egyptian_fractions)

Inputs: numerator (required), denominator (required).

egyptian_fraction_lcmC

Find common denominators for Egyptian fraction operations. (Domain: arithmetic, Category: egyptian_fractions)

Inputs: denominators (required).

egyptian_fraction_propertiesC

Analyze properties of an Egyptian fraction decomposition. (Domain: arithmetic, Category: egyptian_fractions)

Inputs: denominators (required).

element_wise_divideC

Divide two vectors element-wise (Domain: linear_algebra.vectors, Category: general)

Inputs: vector_a (required), vector_b (required).

element_wise_multiplyC

Multiply two vectors element-wise (Hadamard product) (Domain: linear_algebra.vectors, Category: general)

Inputs: vector_a (required), vector_b (required).

equalA

Check if two numbers are exactly equal. For floating-point numbers, consider using approximately_equal instead. (Domain: arithmetic, Category: comparison)

Inputs: a (required), b (required).

euclidean_normC

Calculate the Euclidean norm (L2 norm) of a vector (Domain: linear_algebra.vectors, Category: general)

Inputs: vector (required).

euler_gammaB

Get the Euler-Mascheroni constant γ ā‰ˆ 0.57722. Limit of harmonic series minus natural logarithm. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

euler_totientB

Calculate Euler's totient function φ(n) - count of integers ≤ n coprime to n. (Domain: arithmetic, Category: arithmetic_functions)

Inputs: n (required).

euler_totient_inversionC

Derive Euler's totient function using Mƶbius inversion. (Domain: arithmetic, Category: mobius_functions)

Inputs: n (required).

expB

Calculate e raised to the power of x. Returns e^x, the exponential function. (Domain: arithmetic, Category: general)

Inputs: x (required).

exponential_cdfC

Calculate the cumulative distribution function (CDF) of the exponential distribution (Domain: probability, Category: general)

Inputs: x (required), rate.

exponential_moving_averageC

Compute Exponential Moving Average (EMA) - gives more weight to recent observations (Domain: timeseries, Category: analysis)

Inputs: data (required), alpha (required), initial.

exponential_pdfC

Calculate the probability density function (PDF) of the exponential distribution (Domain: probability, Category: general)

Inputs: x (required), rate.

exponential_sampleC

Generate random samples from the exponential distribution (Domain: probability, Category: general)

Inputs: n (required), rate, seed.

exponential_smoothingC

Simple exponential smoothing forecast for time series (Domain: timeseries, Category: analysis)

Inputs: data (required), alpha, forecast_periods.

exp_seriesC

Compute exponential function e^x using Taylor series (Domain: numerical, Category: series)

Inputs: x (required), n (required).

extended_gcdA

Extended Euclidean algorithm. Returns gcd(a,b) and coefficients x,y such that ax + by = gcd(a,b). (Domain: arithmetic, Category: number_theory)

Inputs: a (required), b (required).

extended_gcd_bezoutC

Extended GCD with BƩzout coefficients and multiple representations. (Domain: arithmetic, Category: bezout_identity)

Inputs: a (required), b (required), find_alternatives.

factorialC

Calculate factorial n! = n Ɨ (n-1) Ɨ ... Ɨ 2 Ɨ 1. (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

farey_fraction_betweenC

Find a fraction between two given fractions using Farey sequence properties. (Domain: arithmetic, Category: farey_sequences)

Inputs: p1 (required), q1 (required), p2 (required), q2 (required).

farey_mediant_pathC

Find path through Farey sequence using mediant operations. (Domain: arithmetic, Category: farey_sequences)

Inputs: start_p (required), start_q (required), end_p (required), end_q (required), +1 more.

farey_neighborsC

Find the neighbors of a fraction in a Farey sequence. (Domain: arithmetic, Category: farey_sequences)

Inputs: p (required), q (required), n (required).

farey_sequenceC

Generate the Farey sequence F_n of order n. (Domain: arithmetic, Category: farey_sequences)

Inputs: n (required).

farey_sequence_lengthC

Calculate the length of Farey sequence F_n. (Domain: arithmetic, Category: farey_sequences)

Inputs: n (required).

farey_sequence_propertiesC

Analyze comprehensive properties of Farey sequence F_n. (Domain: arithmetic, Category: farey_sequences)

Inputs: n (required).

farey_sumC

Calculate Farey sum of two fractions with applications to modular arithmetic. (Domain: arithmetic, Category: farey_sequences)

Inputs: p1 (required), q1 (required), p2 (required), q2 (required).

fermat_numbersC

Generate Fermat numbers F_n = 2^(2^n) + 1 up to index limit. (Domain: arithmetic, Category: special_primes)

Inputs: limit (required).

fermat_primality_checkC

Perform Fermat primality check for base a. (Domain: arithmetic, Category: primality_tests)

Inputs: n (required), a (required).

fermat_primality_testC

Fermat primality test. Simple but can be fooled by Carmichael numbers. (Domain: arithmetic, Category: advanced_primality)

Inputs: n (required), k.

fibonacciC

Calculate the nth Fibonacci number using efficient matrix exponentiation. (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

fibonacci_greedy_egyptianD

Alternative greedy algorithm for Egyptian fractions (Fibonacci method). (Domain: arithmetic, Category: egyptian_fractions)

Inputs: numerator (required), denominator (required).

fibonacci_sequenceC

Generate the first n Fibonacci numbers. (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

find_amicable_pairsC

Find all amicable number pairs up to limit. (Domain: arithmetic, Category: special_numbers)

Inputs: limit (required).

find_differencesC

Find the differences between consecutive terms in a sequence. Useful for pattern analysis. (Domain: arithmetic, Category: general)

Inputs: sequence (required).

find_social_numbersC

Find sociable numbers (amicable chains of length > 2). (Domain: arithmetic, Category: special_numbers)

Inputs: limit (required), max_chain_length.

first_n_primesA

Generate the first n prime numbers using the Sieve of Eratosthenes algorithm. (Domain: arithmetic, Category: number_theory)

Inputs: n (required).

fishers_exact_testC

Perform Fisher's exact test for 2x2 contingency tables to test association between two categorical variables (Domain: statistics, Category: inference)

Inputs: a (required), b (required), c (required), d (required), +1 more.

floorA

Return the floor of a number (largest integer less than or equal to x). (Domain: arithmetic, Category: core)

Inputs: x (required).

floor_multipleA

Round a number down to the nearest multiple of significance. Always rounds toward zero. (Domain: arithmetic, Category: general)

Inputs: number (required), significance (required).

fmodB

Calculate floating-point modulo operation. Similar to % but for floats. (Domain: arithmetic, Category: core)

Inputs: x (required), y (required).

ford_circle_propertiesC

Analyze properties of Ford circles including tangency relationships. (Domain: arithmetic, Category: farey_sequences)

Inputs: n (required).

ford_circlesC

Generate Ford circles for fractions in Farey sequence F_n. (Domain: arithmetic, Category: farey_sequences)

Inputs: n (required).

fourier_coefficients_basicC

Calculate basic Fourier series coefficients for common waveforms. (Domain: trigonometry, Category: wave_analysis)

Inputs: waveform (required), n_terms.

fourier_series_approximationC

Compute Fourier series approximation of periodic function (Domain: numerical, Category: series)

Inputs: f (required), period (required), n_terms (required), x (required), +1 more.

frequency_from_periodC

Calculate frequency from period and related wave properties. (Domain: trigonometry, Category: wave_analysis)

Inputs: period (required).

frobenius_numberC

Calculate the Frobenius number for given denominations. (Domain: arithmetic, Category: diophantine_equations)

Inputs: denominations (required).

gap_analysisC

Analyze gaps between consecutive fractions in Farey sequence. (Domain: arithmetic, Category: farey_sequences)

Inputs: n (required).

gaussian_eliminationC

Solve a system of linear equations Ax = b using Gaussian elimination (Domain: linear_algebra.matrices, Category: general)

Inputs: matrix_a (required), vector_b (required).

gcdC

Calculate the Greatest Common Divisor (GCD) of two integers using Euclidean algorithm. (Domain: arithmetic, Category: number_theory)

Inputs: a (required), b (required).

generalized_crtC

Solve generalized CRT system allowing non-coprime moduli. (Domain: arithmetic, Category: modular_arithmetic)

Inputs: congruences (required).

generate_partitionsC

Generate all integer partitions of n. (Domain: arithmetic, Category: partitions)

Inputs: n (required).

generate_sidon_setC

Generate a Sidon set (B_h sequence) - no two distinct sums are equal. (Domain: arithmetic, Category: additive_number_theory)

Inputs: limit (required), size (required).

geom_circle_areaC

Calculate the area of a circle (Domain: geometry, Category: general)

Inputs: radius (required).

geom_circle_circumferenceC

Calculate the circumference of a circle (Domain: geometry, Category: general)

Inputs: radius (required).

geom_circle_intersectionC

Find intersection points of two circles (Domain: geometry, Category: general)

Inputs: circle1 (required), circle2 (required).

geom_distanceC

Calculate Euclidean distance between two 2D points (Domain: geometry, Category: general)

Inputs: p1 (required), p2 (required).

geom_distance_3dC

Calculate Euclidean distance between two 3D points (Domain: geometry, Category: general)

Inputs: p1 (required), p2 (required).

geometric_sequenceC

Generate a geometric sequence with given first term, common ratio, and number of terms. (Domain: arithmetic, Category: general)

Inputs: first_term (required), common_ratio (required), num_terms (required).

geometric_seriesB

Compute geometric series sum a + ar + ar^2 + ... + ar^(n-1) (Domain: numerical, Category: series)

Inputs: a (required), r (required), n (required).

geometric_sumC

Calculate the sum of a geometric sequence. For |r| < 1, can calculate infinite series sum. (Domain: arithmetic, Category: general)

Inputs: first_term (required), common_ratio (required), num_terms.

geom_great_circle_distanceC

Calculate great circle distance between two points on Earth (GPS coordinates) (Domain: geometry, Category: general)

Inputs: lat1 (required), lon1 (required), lat2 (required), lon2 (required).

geom_line_intersectionC

Find intersection point of two lines in 2D space (Domain: geometry, Category: general)

Inputs: line1 (required), line2 (required).

geom_manhattan_distanceC

Calculate Manhattan (taxicab) distance between two 2D points (Domain: geometry, Category: general)

Inputs: p1 (required), p2 (required).

geom_point_in_polygonC

Check if a point is inside a polygon using ray casting algorithm (Domain: geometry, Category: general)

Inputs: point (required), polygon (required).

geom_polygon_areaC

Calculate the area of a polygon using the Shoelace formula (Domain: geometry, Category: general)

Inputs: vertices (required).

geom_segment_intersectionC

Find intersection point of two line segments in 2D space (Domain: geometry, Category: general)

Inputs: seg1 (required), seg2 (required).

geom_triangle_areaC

Calculate the area of a triangle given three vertices (Domain: geometry, Category: general)

Inputs: p1 (required), p2 (required), p3 (required).

glaisherA

Get the Glaisher-Kinkelin constant A ā‰ˆ 1.28243. Related to Barnes G-function and hyperfactorials. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

gnomon_numberC

Calculate gnomon numbers for s-gonal numbers. (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required), s (required).

goldbach_conjecture_checkC

Check Goldbach conjecture: every even integer > 2 is sum of two primes. (Domain: arithmetic, Category: additive_number_theory)

Inputs: n (required).

goldbach_pairsC

Find all Goldbach pairs for an even number. (Domain: arithmetic, Category: additive_number_theory)

Inputs: n (required).

golden_ratioB

Get the golden ratio φ ā‰ˆ 1.61803. Appears in art, nature, and Fibonacci sequence. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

golden_ratio_cfC

Generate continued fraction expansion of golden ratio φ. (Domain: arithmetic, Category: continued_fractions)

Inputs: terms (required).

gradians_to_degreesC

Convert gradians to degrees. (Domain: trigonometry, Category: angle_conversion)

Inputs: gradians (required).

gradians_to_radiansC

Convert gradians to radians. (Domain: trigonometry, Category: angle_conversion)

Inputs: gradians (required).

gradient_descentC

Perform gradient descent optimization to find minimum of a function (Domain: numerical, Category: optimization)

Inputs: f (required), grad_f (required), x0 (required), learning_rate, +2 more.

gradient_descent_momentumB

Perform gradient descent with momentum for faster convergence (Domain: numerical, Category: optimization)

Inputs: f (required), grad_f (required), x0 (required), learning_rate, +3 more.

gram_schmidtC

Apply Gram-Schmidt orthogonalization to a set of vectors (Domain: linear_algebra.vectors, Category: general)

Inputs: vectors (required), normalize.

greater_thanB

Check if the first number is greater than the second number. (Domain: arithmetic, Category: comparison)

Inputs: a (required), b (required).

greater_than_or_equalA

Check if the first number is greater than or equal to the second number. (Domain: arithmetic, Category: comparison)

Inputs: a (required), b (required).

half_angle_formulasC

Calculate trigonometric functions using half angle formulas. (Domain: trigonometry, Category: identities)

Inputs: angle (required), function.

happy_numbersC

Find all happy numbers up to a limit. (Domain: arithmetic, Category: iterative_sequences)

Inputs: limit (required).

harmonic_analysisC

Analyze harmonic content and calculate basic Fourier coefficients. (Domain: trigonometry, Category: wave_analysis)

Inputs: fundamental_freq (required), harmonics (required), amplitudes (required).

harmonic_meanB

Calculate harmonic mean of a list of positive numbers. (Domain: arithmetic, Category: harmonic_series)

Inputs: numbers (required).

harmonic_numberB

Calculate the nth harmonic number H_n = 1 + 1/2 + 1/3 + ... + 1/n. (Domain: arithmetic, Category: harmonic_series)

Inputs: n (required).

harmonic_number_fractionC

Calculate harmonic number using exact fractions (returns as fraction). (Domain: arithmetic, Category: harmonic_series)

Inputs: n (required).

harmonic_partial_sumC

Calculate partial sum of harmonic series with given terms. (Domain: arithmetic, Category: harmonic_series)

Inputs: start (required), end (required).

harmonic_seriesB

Calculate the nth partial sum of the harmonic series: 1 + 1/2 + 1/3 + ... + 1/n. (Domain: arithmetic, Category: general)

Inputs: n (required).

harshad_numbersC

Find all Harshad numbers up to a limit. (Domain: arithmetic, Category: digital_operations)

Inputs: limit (required), base.

hexadecimal_to_decimalC

Convert hexadecimal (base-16) to decimal number. (Domain: arithmetic, Category: number_systems)

Inputs: hex_str (required).

hexagram_numberC

Calculate the nth hexagram number (Star of David). (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required).

holt_winters_forecastC

Holt-Winters exponential smoothing forecast with trend and seasonality (Domain: timeseries, Category: analysis)

Inputs: data (required), period (required), alpha, beta, +2 more.

horner_methodC

Evaluate polynomial using Horner's method (efficient computation) (Domain: numerical, Category: series)

Inputs: coefficients (required), x (required).

hyperbolic_functionsC

Calculate all hyperbolic functions for a given x simultaneously. (Domain: trigonometry, Category: hyperbolic)

Inputs: x (required).

icosahedral_numberB

Calculate the nth icosahedral number. (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required).

improper_to_egyptianC

Convert improper fraction to mixed number and Egyptian fraction for fractional part. (Domain: arithmetic, Category: egyptian_fractions)

Inputs: numerator (required), denominator (required).

incremental_sieveC

Incremental sieve for extending existing sieve results efficiently. (Domain: arithmetic, Category: sieve_algorithms)

Inputs: current_primes (required), current_limit (required), new_limit (required).

infinityB

Get positive infinity. Represents unbounded growth or division by zero limit. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

in_rangeB

Check if a number is within a specified range (inclusive by default). (Domain: arithmetic, Category: comparison)

Inputs: value (required), min_val (required), max_val (required), inclusive.

integers_in_rangeC

Generate integers (positive, negative, and zero) in a given range. (Domain: arithmetic, Category: number_systems)

Inputs: start (required), end (required).

integrate_midpointC

Calculate definite integral using the midpoint rule (Domain: calculus, Category: general)

Inputs: func (required), a (required), b (required), n_steps.

integrate_simpsonC

Calculate definite integral using Simpson's rule (more accurate than trapezoid) (Domain: calculus, Category: general)

Inputs: func (required), a (required), b (required), n_steps.

integrate_trapezoidC

Calculate definite integral using the trapezoidal rule (Domain: calculus, Category: general)

Inputs: func (required), a (required), b (required), n_steps.

inverse_hyperbolic_functionsC

Calculate all inverse hyperbolic functions for a given x. (Domain: trigonometry, Category: inverse_hyperbolic)

Inputs: x (required).

is_abundant_numberB

Check if a number is abundant (sum of proper divisors > n). (Domain: arithmetic, Category: arithmetic_functions)

Inputs: n (required).

is_additive_basisC

Check if a set forms an additive basis for integers up to limit. (Domain: arithmetic, Category: additive_number_theory)

Inputs: basis (required), limit (required), max_terms.

is_admissible_patternC

Check if a given pattern is admissible for prime constellations. (Domain: arithmetic, Category: prime_patterns)

Inputs: pattern (required).

is_amicable_numberC

Check if a number is amicable (part of an amicable pair). (Domain: arithmetic, Category: special_numbers)

Inputs: n (required).

is_arithmeticC

Check if a sequence is arithmetic (constant difference between consecutive terms). (Domain: arithmetic, Category: general)

Inputs: sequence (required), tolerance.

is_automorphic_numberB

Check if a number is automorphic (its square ends with the number itself). (Domain: arithmetic, Category: digital_operations)

Inputs: n (required).

is_carmichael_numberC

Check if n is a Carmichael number (absolute Fermat pseudoprime). (Domain: arithmetic, Category: pseudoprimes)

Inputs: n (required).

is_catalan_numberC

Check if a number is a Catalan number. (Domain: arithmetic, Category: combinatorial_numbers)

Inputs: n (required).

is_closeC

Relative tolerance comparison using both absolute and relative tolerances. (Domain: arithmetic, Category: comparison)

Inputs: a (required), b (required), rel_tol, abs_tol.

is_coprimeB

Check if two numbers are coprime (their greatest common divisor is 1). (Domain: arithmetic, Category: number_theory)

Inputs: a (required), b (required).

is_deficient_numberB

Check if a number is deficient (sum of proper divisors < n). (Domain: arithmetic, Category: arithmetic_functions)

Inputs: n (required).

is_divisibleB

Check if the first number is divisible by the second number (remainder is zero). (Domain: arithmetic, Category: number_theory)

Inputs: a (required), b (required).

is_evenA

Check if a number is even (divisible by 2). (Domain: arithmetic, Category: number_theory)

Inputs: n (required).

is_fermat_primeB

Check if a number is a Fermat prime (prime of form 2^(2^n) + 1). (Domain: arithmetic, Category: special_primes)

Inputs: n (required).

is_fermat_pseudoprimeC

Check if n is a Fermat pseudoprime to base a. (Domain: arithmetic, Category: pseudoprimes)

Inputs: n (required), a (required).

is_fibonacci_numberC

Check if a number is a Fibonacci number. (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

is_finiteA

Check if a number is finite (not infinite and not NaN). (Domain: arithmetic, Category: comparison)

Inputs: x (required).

is_geometricC

Check if a sequence is geometric (constant ratio between consecutive terms). (Domain: arithmetic, Category: general)

Inputs: sequence (required), tolerance.

is_happy_numberC

Check if a number is a happy number. (Domain: arithmetic, Category: iterative_sequences)

Inputs: n (required).

is_harshad_numberB

Check if a number is a Harshad (Niven) number (divisible by sum of its digits). (Domain: arithmetic, Category: digital_operations)

Inputs: n (required), base.

is_infiniteA

Check if a number is infinite (positive or negative infinity). (Domain: arithmetic, Category: comparison)

Inputs: x (required).

is_kaprekar_numberC

Check if a number is a Kaprekar number and show the split. (Domain: arithmetic, Category: special_numbers)

Inputs: n (required).

is_keith_numberC

Check if a number is a Keith number and show the sequence. (Domain: arithmetic, Category: special_numbers)

Inputs: n (required).

is_mersenne_primeB

Check if a number is a Mersenne prime (prime of form 2^p - 1 where p is prime). (Domain: arithmetic, Category: special_primes)

Inputs: n (required).

is_nanB

Check if a number is NaN (Not a Number). (Domain: arithmetic, Category: comparison)

Inputs: x (required).

is_narcissistic_numberA

Check if a number is narcissistic (equals sum of its digits raised to the power of digit count). (Domain: arithmetic, Category: iterative_sequences)

Inputs: n (required).

is_normalA

Check if a number is normal (finite, non-zero, and not subnormal). (Domain: arithmetic, Category: comparison)

Inputs: x (required).

is_oddB

Check if a number is odd (not divisible by 2). (Domain: arithmetic, Category: number_theory)

Inputs: n (required).

is_optimal_egyptian_fractionC

Check if Egyptian fraction representation is optimal (shortest possible). (Domain: arithmetic, Category: egyptian_fractions)

Inputs: numerator (required), denominator (required), representation (required).

is_palindromic_numberC

Check if a number is palindromic in given base. (Domain: arithmetic, Category: digital_operations)

Inputs: n (required), base.

is_pentagonal_numberC

Check if a number is a pentagonal number. (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

is_perfect_numberA

Check if a number is perfect (equals sum of its proper divisors). (Domain: arithmetic, Category: arithmetic_functions)

Inputs: n (required).

is_perfect_squareB

Check if a number is a perfect square. (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

is_polygonal_numberC

Check if a number is an s-gonal number. (Domain: arithmetic, Category: figurate_numbers)

Inputs: num (required), s (required).

is_power_of_twoC

Check if a number is a power of two. (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

is_primeA

Check if a number is prime. A prime number is only divisible by 1 and itself. (Domain: arithmetic, Category: number_theory)

Inputs: n (required).

is_pronic_numberC

Check if a number is a pronic number. (Domain: arithmetic, Category: figurate_numbers)

Inputs: num (required).

is_proper_fractionA

Check if a fraction is proper (numerator < denominator). (Domain: arithmetic, Category: egyptian_fractions)

Inputs: numerator (required), denominator (required).

is_quadratic_residueC

Check if a is a quadratic residue modulo n. (Domain: arithmetic, Category: modular_arithmetic)

Inputs: a (required), n (required).

is_repdigitB

Check if a number has all identical digits (repdigit). (Domain: arithmetic, Category: digital_operations)

Inputs: n (required), base.

is_safe_primeA

Check if a prime q is a safe prime (q = 2p + 1 where p is prime). (Domain: arithmetic, Category: special_primes)

Inputs: q (required).

is_sophie_germain_primeA

Check if a prime p is a Sophie Germain prime (2p + 1 is also prime). (Domain: arithmetic, Category: special_primes)

Inputs: p (required).

is_triangular_numberC

Check if a number is a triangular number. (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

is_twin_primeA

Check if a number is part of a twin prime pair (p, p+2). (Domain: arithmetic, Category: special_primes)

Inputs: p (required).

is_unit_fractionA

Check if a fraction is a unit fraction (numerator = 1). (Domain: arithmetic, Category: egyptian_fractions)

Inputs: numerator (required), denominator (required).

is_valid_baseC

Check if a base value is valid (between 2 and 36). (Domain: arithmetic, Category: number_systems)

Inputs: base (required).

is_vampire_numberC

Check if a number is a vampire number and find its fangs. (Domain: arithmetic, Category: special_numbers)

Inputs: n (required).

jacobi_symbolC

Compute Jacobi symbol (a/n) for odd n. (Domain: arithmetic, Category: modular_arithmetic)

Inputs: a (required), n (required).

jordan_totientC

Calculate Jordan's totient function J_k(n) - generalization of Euler's totient. (Domain: arithmetic, Category: arithmetic_functions)

Inputs: n (required), k (required).

kaprekar_constantC

Get the Kaprekar constant for a given number of digits. (Domain: arithmetic, Category: iterative_sequences)

Inputs: digits (required).

kaprekar_numbersC

Find all Kaprekar numbers up to limit. (Domain: arithmetic, Category: special_numbers)

Inputs: limit (required).

kaprekar_sequenceC

Generate Kaprekar sequence for a number with given digit count. (Domain: arithmetic, Category: iterative_sequences)

Inputs: n (required), digits (required).

keith_numbersC

Find all Keith numbers up to limit. (Domain: arithmetic, Category: special_numbers)

Inputs: limit (required).

khinchinA

Get Khinchin's constant K ā‰ˆ 2.68545. Geometric mean of continued fraction coefficients. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

known_fermat_primesB

Get the five known Fermat primes. (Domain: arithmetic, Category: special_primes)

Inputs: no named parameters.

kruskal_wallisC

Perform Kruskal-Wallis test (non-parametric ANOVA) to test whether multiple independent samples come from same distribution (Domain: statistics, Category: inference)

Inputs: groups (required), alpha.

lagged_valuesC

Create lagged version of time series - shift values by specified number of periods (Domain: timeseries, Category: analysis)

Inputs: data (required), lags (required).

lagrange_interpolateC

Perform Lagrange polynomial interpolation through given points (Domain: numerical, Category: interpolation)

Inputs: x_points (required), y_points (required), x (required).

largest_prime_gap_in_rangeC

Find the largest prime gap in a given range. (Domain: arithmetic, Category: prime_gaps)

Inputs: start (required), end (required).

lcmB

Calculate the Least Common Multiple (LCM) of two integers. (Domain: arithmetic, Category: number_theory)

Inputs: a (required), b (required).

legendre_symbolC

Compute Legendre symbol (a/p) for prime p. (Domain: arithmetic, Category: modular_arithmetic)

Inputs: a (required), p (required).

less_thanB

Check if the first number is less than the second number. (Domain: arithmetic, Category: comparison)

Inputs: a (required), b (required).

less_than_or_equalB

Check if the first number is less than or equal to the second number. (Domain: arithmetic, Category: comparison)

Inputs: a (required), b (required).

levenes_testC

Perform Levene's test for equality of variances to test whether groups have equal variances (Domain: statistics, Category: inference)

Inputs: groups (required), alpha.

linear_interpolateC

Perform linear interpolation between two points (Domain: numerical, Category: interpolation)

Inputs: x (required), x0 (required), y0 (required), x1 (required), +1 more.

linear_interpolate_sequenceC

Perform linear interpolation on a sequence of points (Domain: numerical, Category: interpolation)

Inputs: x_points (required), y_points (required), x (required).

linear_regressionC

Perform linear regression to fit y = mx + b and return slope, intercept, and R² (Domain: statistics, Category: general)

Inputs: xs (required), ys (required).

linear_sieveC

Linear time sieve (Sieve of Euler) - each composite marked exactly once. (Domain: arithmetic, Category: sieve_algorithms)

Inputs: limit (required).

liouville_functionC

Calculate the Liouville function Ī»(n) = (-1)^Ī©(n). (Domain: arithmetic, Category: arithmetic_functions)

Inputs: n (required).

little_omegaA

Calculate ω(n) - number of distinct prime factors. (Domain: arithmetic, Category: arithmetic_functions)

Inputs: n (required).

lnA

Calculate the natural logarithm (base e) of a number. Returns ln(x) where e^ln(x) = x. (Domain: arithmetic, Category: general)

Inputs: x (required).

ln10A

Get ln(10) ā‰ˆ 2.30259. Natural logarithm of 10, conversion factor for logarithms. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

ln2A

Get ln(2) ā‰ˆ 0.69315. Natural logarithm of 2, appears in information theory. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

ln_seriesC

Compute natural logarithm ln(1+x) using Taylor series (Domain: numerical, Category: series)

Inputs: x (required), n (required).

logB

Calculate the logarithm of a number to a specified base. Returns log_base(x). (Domain: arithmetic, Category: general)

Inputs: x (required), base (required).

log10A

Calculate the base-10 (common) logarithm of a number. Returns log₁₀(x). (Domain: arithmetic, Category: general)

Inputs: x (required).

log10eA

Get log₁₀(e) ā‰ˆ 0.43429. Common logarithm of e, conversion factor for base 10 logarithms. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

log2B

Calculate the base-2 (binary) logarithm of a number. Returns logā‚‚(x). (Domain: arithmetic, Category: general)

Inputs: x (required).

log2eA

Get logā‚‚(e) ā‰ˆ 1.44270. Logarithm base 2 of e, conversion factor for binary logarithms. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

look_and_say_sequenceC

Generate the look-and-say sequence starting from a number. (Domain: arithmetic, Category: iterative_sequences)

Inputs: start (required), terms (required).

lucas_lehmer_testC

Perform Lucas-Lehmer primality test for Mersenne numbers. (Domain: arithmetic, Category: special_primes)

Inputs: p (required).

lucas_numberC

Calculate the nth Lucas number L_n. (Domain: arithmetic, Category: recursive_sequences)

Inputs: n (required).

lucas_sequenceC

Generate the first n Lucas numbers. (Domain: arithmetic, Category: recursive_sequences)

Inputs: n (required).

lucas_u_vC

Calculate Lucas U_n and V_n sequences with parameters P, Q. (Domain: arithmetic, Category: recursive_sequences)

Inputs: n (required), P (required), Q (required).

machine_epsilonB

Get machine epsilon for floating-point precision. Smallest value where 1 + ε > 1. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

maclaurin_seriesC

Compute Maclaurin series expansion (Taylor series around x=0) (Domain: numerical, Category: series)

Inputs: derivatives (required), x (required), n (required).

magic_constantsC

Calculate magic constants for nƗn magic squares. (Domain: arithmetic, Category: special_numbers)

Inputs: n (required).

manhattan_normC

Calculate the Manhattan norm (L1 norm) of a vector (Domain: linear_algebra.vectors, Category: general)

Inputs: vector (required).

mann_whitney_uB

Perform Mann-Whitney U test (non-parametric alternative to t-test) to test whether two independent samples come from same distribution (Domain: statistics, Category: inference)

Inputs: data1 (required), data2 (required), alpha.

matrix_addC

Add two matrices element-wise (Domain: linear_algebra.matrices, Category: general)

Inputs: matrix_a (required), matrix_b (required).

matrix_det_2x2C

Calculate the determinant of a 2x2 matrix (Domain: linear_algebra.matrices, Category: general)

Inputs: matrix (required).

matrix_det_3x3C

Calculate the determinant of a 3x3 matrix (Domain: linear_algebra.matrices, Category: general)

Inputs: matrix (required).

matrix_multiplyC

Multiply two matrices (matrix-matrix multiplication) (Domain: linear_algebra.matrices, Category: general)

Inputs: matrix_a (required), matrix_b (required).

matrix_scalar_multiplyC

Multiply a matrix by a scalar value (Domain: linear_algebra.matrices, Category: general)

Inputs: matrix (required), scalar (required).

matrix_solve_2x2C

Solve a 2x2 system of linear equations Ax = b using Cramer's rule (Domain: linear_algebra.matrices, Category: general)

Inputs: matrix_a (required), vector_b (required).

matrix_solve_3x3C

Solve a 3x3 system of linear equations Ax = b using Cramer's rule (Domain: linear_algebra.matrices, Category: general)

Inputs: matrix_a (required), vector_b (required).

matrix_subtractC

Subtract one matrix from another element-wise (Domain: linear_algebra.matrices, Category: general)

Inputs: matrix_a (required), matrix_b (required).

matrix_transposeC

Transpose a matrix (swap rows and columns) (Domain: linear_algebra.matrices, Category: general)

Inputs: matrix (required).

max_floatB

Get the maximum finite floating-point value. Largest representable float. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

maximumB

Find the larger of two numbers. (Domain: arithmetic, Category: comparison)

Inputs: a (required), b (required).

max_listC

Find the maximum value in a list of numbers. (Domain: arithmetic, Category: comparison)

Inputs: numbers (required).

meanB

Calculate the arithmetic mean (average) of a list of numbers. Sum all values and divide by count. (Domain: statistics, Category: general)

Inputs: numbers (required).

medianC

Calculate the median (middle value) of a list of numbers. The value that separates the higher half from the lower half. (Domain: statistics, Category: general)

Inputs: numbers (required).

mediantC

Calculate the mediant of two fractions. (Domain: arithmetic, Category: farey_sequences)

Inputs: p1 (required), q1 (required), p2 (required), q2 (required).

mersenne_numbersC

Generate Mersenne numbers 2^p - 1 for prime exponents up to limit. (Domain: arithmetic, Category: special_primes)

Inputs: limit (required).

mersenne_prime_exponentsB

Get known Mersenne prime exponents up to a limit. (Domain: arithmetic, Category: special_primes)

Inputs: limit (required).

mertens_function_sieveC

Calculate Mertens function M(n) = Σμ(k) for k=1 to n using sieve. (Domain: arithmetic, Category: sieve_algorithms)

Inputs: n (required).

miller_rabin_testC

Miller-Rabin probabilistic primality test. Industry standard for cryptographic applications. (Domain: arithmetic, Category: advanced_primality)

Inputs: n (required), k.

min_floatB

Get the minimum positive normalized floating-point value. Smallest positive normal float. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

minimumB

Find the smaller of two numbers. (Domain: arithmetic, Category: comparison)

Inputs: a (required), b (required).

min_listB

Find the minimum value in a list of numbers. (Domain: arithmetic, Category: comparison)

Inputs: numbers (required).

min_waring_numberC

Find minimum number of k-th powers needed to represent n. (Domain: arithmetic, Category: additive_number_theory)

Inputs: n (required), k (required).

mobius_functionC

Calculate the Möbius function μ(n). (Domain: arithmetic, Category: arithmetic_functions)

Inputs: n (required).

mobius_function_rangeC

Calculate Mƶbius function values for a range of numbers efficiently. (Domain: arithmetic, Category: mobius_functions)

Inputs: n (required).

mobius_inversion_formulaC

Apply Mƶbius inversion formula to recover function from its summatory function. (Domain: arithmetic, Category: mobius_functions)

Inputs: g_values (required), n (required).

modeB

Find the mode (most frequently occurring value) in a list of numbers. Returns all values that appear most frequently. (Domain: statistics, Category: general)

Inputs: numbers (required).

mod_powerA

Calculate modular exponentiation: (base^exponent) mod modulus. Efficient for large numbers. (Domain: arithmetic, Category: core)

Inputs: base (required), exponent (required), modulus (required).

moduloA

Calculate the modulo (remainder) of division. Returns a % b. (Domain: arithmetic, Category: core)

Inputs: a (required), b (required).

moving_averageC

Calculate moving average (rolling average) of a dataset (Domain: statistics, Category: general)

Inputs: numbers (required), window (required).

moving_average_forecastB

Moving average forecast - predict next value using average of recent observations (Domain: timeseries, Category: analysis)

Inputs: data (required), window (required), forecast_periods.

mroundC

Round a number to the nearest multiple of significance. Uses standard rounding rules. (Domain: arithmetic, Category: general)

Inputs: number (required), significance (required).

multinomialC

Calculate the multinomial coefficient. Generalization of binomial coefficient for multiple groups. (Domain: arithmetic, Category: general)

Inputs: numbers (required).

multiplicative_function_analysisC

Analyze multiplicative functions using Mƶbius techniques. (Domain: arithmetic, Category: mobius_functions)

Inputs: function_name (required), range_end.

multiplyC

Multiply two numbers together. (Domain: arithmetic, Category: core)

Inputs: a (required), b (required).

multiply_in_baseC

Multiply two numbers in a specified base. (Domain: arithmetic, Category: number_systems)

Inputs: num1 (required), num2 (required), base (required).

nanB

Get NaN (Not a Number). Represents undefined or invalid mathematical operations. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

narayana_cow_numberC

Calculate Narayana's cow sequence (cows that reproduce). (Domain: arithmetic, Category: recursive_sequences)

Inputs: n (required).

narayana_numberC

Calculate Narayana number N(n,k) = (1/n) * C(n,k) * C(n,k-1) - FIXED. (Domain: arithmetic, Category: combinatorial_numbers)

Inputs: n (required), k (required).

narayana_triangle_rowC

Generate row n of Narayana triangle - FIXED. (Domain: arithmetic, Category: combinatorial_numbers)

Inputs: n (required).

narcissistic_numbersC

Find all narcissistic numbers up to a limit. (Domain: arithmetic, Category: iterative_sequences)

Inputs: limit (required).

natural_numbersC

Generate natural numbers (positive integers) in a given range. (Domain: arithmetic, Category: number_systems)

Inputs: start, end.

negateB

Negate a number (return its additive inverse). (Domain: arithmetic, Category: core)

Inputs: x (required).

nelder_meadC

Perform Nelder-Mead simplex algorithm for derivative-free optimization (Domain: numerical, Category: optimization)

Inputs: f (required), x0 (required), alpha, gamma, +4 more.

newton_interpolateC

Perform Newton polynomial interpolation using divided differences (Domain: numerical, Category: interpolation)

Inputs: x_points (required), y_points (required), x (required).

next_palindromeC

Find the next palindromic number greater than n. (Domain: arithmetic, Category: digital_operations)

Inputs: n (required), base.

next_primeA

Find the next prime number greater than the given number. (Domain: arithmetic, Category: number_theory)

Inputs: n (required).

normal_cdfC

Calculate the cumulative distribution function (CDF) of the normal distribution (Domain: probability, Category: general)

Inputs: x (required), mean, std.

normalize_angleC

Normalize an angle to a standard range. (Domain: trigonometry, Category: angle_conversion)

Inputs: angle (required), unit, range_type.

normalize_vectorC

Normalize a vector to unit length (Domain: linear_algebra.vectors, Category: general)

Inputs: vector (required), norm_type, tolerance.

normal_pdfC

Calculate the probability density function (PDF) of the normal distribution (Domain: probability, Category: general)

Inputs: x (required), mean, std.

normal_sampleC

Generate random samples from the normal distribution (Domain: probability, Category: general)

Inputs: n (required), mean, std, seed.

not_equalB

Check if two numbers are not equal. (Domain: arithmetic, Category: comparison)

Inputs: a (required), b (required).

nth_perfect_squareC

Get the nth perfect square (0-indexed). (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

nth_power_of_twoB

Get the nth power of two (0-indexed). (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

nth_primeB

Find the nth prime number (1-indexed). Uses efficient prime generation. (Domain: arithmetic, Category: number_theory)

Inputs: n (required).

number_to_baseC

Convert a number to specified base representation. (Domain: arithmetic, Category: digital_operations)

Inputs: n (required), base (required).

octahedral_numberC

Calculate the nth octahedral number. (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required).

octal_to_decimalB

Convert octal (base-8) to decimal number. (Domain: arithmetic, Category: number_systems)

Inputs: octal_str (required).

optimized_wilson_testC

Optimized Wilson's theorem test using pairing technique for better performance. (Domain: arithmetic, Category: wilson_theorem)

Inputs: n (required).

order_moduloC

Find the multiplicative order of a modulo n. (Domain: arithmetic, Category: modular_arithmetic)

Inputs: a (required), n (required).

orthogonalizeC

Orthogonalize a vector with respect to a set of vectors (Domain: linear_algebra.vectors, Category: general)

Inputs: vector (required), basis_vectors (required).

oscillation_analysisC

Analyze simple harmonic motion and oscillation properties. (Domain: trigonometry, Category: applications)

Inputs: amplitude (required), frequency (required), phase, damping, +1 more.

padovan_numberC

Calculate the nth Padovan number P_n. (Domain: arithmetic, Category: recursive_sequences)

Inputs: n (required).

paired_t_testB

Perform paired t-test (dependent samples) to test whether paired observations differ significantly (Domain: statistics, Category: inference)

Inputs: before (required), after (required), alpha.

palindromic_numbersC

Find all palindromic numbers up to a limit. (Domain: arithmetic, Category: digital_operations)

Inputs: limit (required), base.

parametric_solutions_diophantineC

Generate parametric solutions to linear Diophantine equation. (Domain: arithmetic, Category: diophantine_equations)

Inputs: a (required), b (required), c (required), t_min (required), +1 more.

partial_autocorrelationC

Compute partial autocorrelation at a given lag - correlation after removing effects of intermediate lags (Domain: timeseries, Category: analysis)

Inputs: data (required), lag (required).

partition_countB

Count the number of integer partitions of n using dynamic programming. (Domain: arithmetic, Category: partitions)

Inputs: n (required).

partitions_into_k_partsC

Count partitions of n into at most k parts. (Domain: arithmetic, Category: partitions)

Inputs: n (required), k (required).

pell_lucas_numberC

Calculate the nth Pell-Lucas number (companion to Pell numbers). (Domain: arithmetic, Category: recursive_sequences)

Inputs: n (required).

pell_numberB

Calculate the nth Pell number P_n. (Domain: arithmetic, Category: recursive_sequences)

Inputs: n (required).

pell_sequenceC

Generate the first n Pell numbers. (Domain: arithmetic, Category: recursive_sequences)

Inputs: n (required).

pell_solutions_generatorC

Generate multiple solutions to Pell's equation x² - ny² = 1. (Domain: arithmetic, Category: diophantine_equations)

Inputs: n (required), num_solutions (required).

pendulum_periodC

Calculate pendulum period and analyze pendulum motion. (Domain: trigonometry, Category: applications)

Inputs: length (required), gravity, angle.

pentagonal_numberA

Calculate the nth pentagonal number P_n = n(3n-1)/2. (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

pentagonal_pyramidal_numberC

Calculate the nth pentagonal pyramidal number. (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required).

pentagonal_sequenceC

Generate the first n pentagonal numbers. (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

percentileC

Calculate percentiles of a dataset. Find the value below which a certain percentage of data falls. (Domain: statistics, Category: general)

Inputs: numbers (required), percentile (required).

perfect_numbers_up_toC

Find all perfect numbers up to limit using Euclid-Euler theorem. (Domain: arithmetic, Category: arithmetic_functions)

Inputs: limit (required).

perfect_squaresB

Generate the first n perfect squares. (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

periodic_continued_fractionsC

Analyze periodic structure of quadratic irrational continued fractions. (Domain: arithmetic, Category: continued_fractions)

Inputs: numbers (required).

permutation_testC

Perform permutation test for difference in means (non-parametric test using random permutations) (Domain: statistics, Category: inference)

Inputs: data1 (required), data2 (required), n_permutations, alpha.

persistent_digital_rootC

Calculate persistent digital root (number of steps to reach single digit). (Domain: arithmetic, Category: digital_operations)

Inputs: n (required), base.

phase_shift_analysisC

Analyze phase relationships between waves. (Domain: trigonometry, Category: wave_analysis)

Inputs: phase_diff (required), frequency.

piA

Get the mathematical constant Ļ€ (pi) ā‰ˆ 3.14159. The ratio of a circle's circumference to its diameter. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

pi_cf_algorithmsC

Generate various continued fraction approximations to π. (Domain: arithmetic, Category: continued_fractions)

Inputs: terms (required).

pi_digitsC

Generate pi digits to specified precision using high-precision arithmetic. (Domain: arithmetic, Category: mathematical_constants)

Inputs: precision (required).

plastic_numberA

Get the plastic number ρ ā‰ˆ 1.32472. Real root of x³ = x + 1, related to Padovan sequence. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

pluperfect_numbersC

Find all pluperfect digital invariant numbers up to limit. (Domain: arithmetic, Category: special_numbers)

Inputs: limit (required), power (required).

p_normC

Calculate the p-norm of a vector for any p >= 1 (Domain: linear_algebra.vectors, Category: general)

Inputs: vector (required), p (required).

polygonal_numberC

Calculate the nth s-gonal (polygonal) number. (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required), s (required).

polygonal_sequenceC

Generate the first n s-gonal numbers. (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required), s (required).

postage_stamp_problemC

Solve the postage stamp problem (exact postage with given denominations). (Domain: arithmetic, Category: diophantine_equations)

Inputs: amount (required), denominations (required).

powerC

Raise a number to a power. Handles integer and fractional exponents. (Domain: arithmetic, Category: core)

Inputs: base (required), exponent (required).

power_analysisC

Calculate statistical power (probability of detecting effect) for t-test given sample size and effect size (Domain: statistics, Category: inference)

Inputs: n (required), effect_size (required), alpha, alternative.

power_seriesC

Evaluate power series with given coefficients (Domain: numerical, Category: series)

Inputs: coefficients (required), x (required), x0.

power_series_sumA

Calculate the sum of a power series: x⁰ + x¹ + x² + ... + xⁿ for given x and n. (Domain: arithmetic, Category: general)

Inputs: x (required), n (required).

powers_of_twoC

Generate the first n powers of two. (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

prime_constellationsC

Find prime constellations of specified pattern. (Domain: arithmetic, Category: prime_patterns)

Inputs: pattern (required), limit (required).

prime_countA

Count the number of prime numbers less than or equal to n (prime counting function π(n)). (Domain: arithmetic, Category: number_theory)

Inputs: n (required).

prime_counting_functionC

Approximate the prime counting function π(x). (Domain: arithmetic, Category: prime_distribution)

Inputs: x (required).

prime_counting_sieveA

Count primes up to limit using optimized sieve (returns count, not list). (Domain: arithmetic, Category: sieve_algorithms)

Inputs: limit (required).

prime_density_analysisC

Analyze prime density in intervals. (Domain: arithmetic, Category: prime_analysis)

Inputs: limit (required), interval_size (required).

prime_factorsB

Find all prime factors of a number. Returns the prime factorization as a list. (Domain: arithmetic, Category: number_theory)

Inputs: n (required).

prime_gapC

Calculate the gap between a prime and the next prime. (Domain: arithmetic, Category: prime_gaps)

Inputs: p (required).

prime_gap_recordsC

Find record prime gaps (first occurrence of each gap size). (Domain: arithmetic, Category: prime_conjectures)

Inputs: limit (required).

prime_gaps_analysisC

Analyze prime gaps in a given range. (Domain: arithmetic, Category: prime_distribution)

Inputs: start (required), end (required).

prime_gap_sieveC

Analyze prime gaps using sieve-generated primes. (Domain: arithmetic, Category: sieve_algorithms)

Inputs: limit (required).

prime_number_theorem_errorC

Analyze the error in Prime Number Theorem approximation. (Domain: arithmetic, Category: prime_distribution)

Inputs: x (required).

prime_quadrupletsC

Find all prime quadruplets up to limit. (Domain: arithmetic, Category: prime_patterns)

Inputs: limit (required).

prime_tripletsC

Find all prime triplets up to limit. (Domain: arithmetic, Category: prime_patterns)

Inputs: limit (required).

primitive_rootC

Find the smallest primitive root modulo n. (Domain: arithmetic, Category: modular_arithmetic)

Inputs: n (required).

productC

Calculate the product of all numbers in a list. Returns the multiplication of all elements. (Domain: arithmetic, Category: general)

Inputs: numbers (required).

pronic_sequenceC

Generate the first n pronic numbers. (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required).

proportion_testC

Perform two-proportion z-test to test whether two population proportions differ significantly (Domain: statistics, Category: inference)

Inputs: successes1 (required), n1 (required), successes2 (required), n2 (required), +1 more.

pythagorean_identityC

Verify and compute Pythagorean trigonometric identities. (Domain: trigonometry, Category: identities)

Inputs: angle (required), tolerance.

pythagorean_triplesC

Find Pythagorean triples (x, y, z) where x² + y² = z². (Domain: arithmetic, Category: diophantine_equations)

Inputs: limit (required), primitive_only.

quadratic_residuesC

Find all quadratic residues modulo n. (Domain: arithmetic, Category: modular_arithmetic)

Inputs: n (required).

quartilesC

Calculate quartiles of a dataset (Q1, Q2/median, Q3). Divides data into four equal parts. (Domain: statistics, Category: general)

Inputs: numbers (required).

quotientA

Return the integer quotient of division without remainder. Equivalent to a // b. (Domain: arithmetic, Category: general)

Inputs: dividend (required), divisor (required).

radians_to_degreesB

Convert radians to degrees with high precision. (Domain: trigonometry, Category: angle_conversion)

Inputs: radians (required).

radians_to_gradiansB

Convert radians to gradians. (Domain: trigonometry, Category: angle_conversion)

Inputs: radians (required).

random_arrayC

Generate an array of random numbers with specified dimensions. (Domain: arithmetic, Category: general)

Inputs: rows (required), cols (required).

random_floatA

Generate a random float between 0 and 1 (exclusive of 1). (Domain: arithmetic, Category: general)

Inputs: no named parameters.

random_intB

Generate a random integer between min_val and max_val (inclusive). (Domain: arithmetic, Category: general)

Inputs: min_val (required), max_val (required).

range_valueC

Calculate the range (difference between maximum and minimum) of a list of numbers. (Domain: statistics, Category: general)

Inputs: numbers (required).

rank_numbersB

Get the rank (1-based position) of each number in a list when sorted. Handles ties appropriately. (Domain: arithmetic, Category: comparison)

Inputs: numbers (required).

rational_to_cfC

Convert rational number to continued fraction. (Domain: arithmetic, Category: continued_fractions)

Inputs: p (required), q (required).

recaman_sequenceC

Generate the RecamƔn sequence up to n terms. (Domain: arithmetic, Category: iterative_sequences)

Inputs: n (required).

remainderC

Calculate floating-point remainder of division (IEEE remainder operation). (Domain: arithmetic, Category: core)

Inputs: x (required), y (required).

restricted_partitionsC

Count restricted partitions where largest part is at most max_part. (Domain: arithmetic, Category: partitions)

Inputs: n (required), max_part (required).

riemann_hypothesis_connectionC

Explore connections between Farey sequences and the Riemann Hypothesis. (Domain: arithmetic, Category: farey_sequences)

Inputs: n (required).

rolling_stdC

Compute rolling standard deviation over a window (Domain: timeseries, Category: analysis)

Inputs: data (required), window (required).

rolling_varianceC

Compute rolling variance over a window (Domain: timeseries, Category: analysis)

Inputs: data (required), window (required).

roman_to_arabicA

Convert a Roman numeral to Arabic number representation. (Domain: arithmetic, Category: general)

Inputs: numeral (required).

root_find_bisectionC

Find root of a function using the bisection method (robust and guaranteed) (Domain: calculus, Category: general)

Inputs: func (required), a (required), b (required), tol, +1 more.

root_find_newtonB

Find root of a function using Newton's method (fast but requires derivative) (Domain: calculus, Category: general)

Inputs: func (required), fprime (required), x0 (required), tol, +1 more.

root_find_secantC

Find root of a function using the secant method (like Newton but without derivative) (Domain: calculus, Category: general)

Inputs: func (required), x0 (required), x1 (required), tol, +1 more.

round_numberC

Round a number to a specified number of decimal places. (Domain: arithmetic, Category: core)

Inputs: x (required), decimals.

safe_prime_pairsC

Find Sophie Germain and safe prime pairs up to limit. (Domain: arithmetic, Category: special_primes)

Inputs: limit (required).

sample_size_meanC

Calculate required sample size per group for comparing means (power analysis) (Domain: statistics, Category: inference)

Inputs: effect_size (required), alpha, power, alternative.

scalar_multiplyC

Multiply a vector by a scalar value (Domain: linear_algebra.vectors, Category: general)

Inputs: vector (required), scalar (required).

scalar_projectionC

Calculate scalar projection of one vector onto another (Domain: linear_algebra.vectors, Category: general)

Inputs: vector_a (required), vector_b (required).

seasonal_decomposeC

Decompose time series into trend, seasonal, and residual components (Domain: timeseries, Category: analysis)

Inputs: data (required), period (required).

seasonal_strengthC

Measure strength of seasonal component in time series (Domain: timeseries, Category: analysis)

Inputs: data (required), period (required).

secB

Calculate secant (1/cos) of an angle in radians. (Domain: trigonometry, Category: basic_functions)

Inputs: angle (required).

sechC

Calculate hyperbolic secant (1/cosh). (Domain: trigonometry, Category: hyperbolic)

Inputs: x (required).

segmented_sieveC

Segmented sieve for finding primes in a range [low, high] with memory efficiency. (Domain: arithmetic, Category: sieve_algorithms)

Inputs: low (required), high (required).

series_sumC

Calculate the sum of an arithmetic series based on first term, last term, and number of terms. (Domain: arithmetic, Category: general)

Inputs: first (required), last (required), count (required).

sexy_primesB

Find all sexy prime pairs (primes differing by 6) up to limit. (Domain: arithmetic, Category: prime_patterns)

Inputs: limit (required).

shortest_egyptian_fractionC

Find the shortest Egyptian fraction representation by brute force search. (Domain: arithmetic, Category: egyptian_fractions)

Inputs: numerator (required), denominator (required), max_terms.

sieve_of_atkinC

Sieve of Atkin - modern sieve with better asymptotic complexity. (Domain: arithmetic, Category: sieve_algorithms)

Inputs: limit (required).

sieve_of_eratosthenesC

Sieve of Eratosthenes - the classical algorithm for finding all primes up to n. (Domain: arithmetic, Category: sieve_algorithms)

Inputs: limit (required).

sieve_of_sundaramC

Sieve of Sundaram - finds odd primes by eliminating specific composite patterns. (Domain: arithmetic, Category: sieve_algorithms)

Inputs: limit (required).

sieve_performance_analysisC

Compare performance of different sieve algorithms. (Domain: arithmetic, Category: sieve_algorithms)

Inputs: limit (required).

signA

Determine the sign of a number. Returns 1, -1, or 0. (Domain: arithmetic, Category: core)

Inputs: x (required).

silver_ratioB

Get the silver ratio Ī“ ā‰ˆ 2.41421. Equal to 1 + √2, appears in octagon constructions. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

simple_moving_averageB

Compute Simple Moving Average (SMA) - average of last 'window' values at each point (Domain: timeseries, Category: analysis)

Inputs: data (required), window (required).

simplify_trig_expressionC

Basic trigonometric expression simplification (placeholder implementation). (Domain: trigonometry, Category: identities)

Inputs: expression (required).

sinA

Calculate sine of an angle in radians with high precision. (Domain: trigonometry, Category: basic_functions)

Inputs: angle (required).

sin_degreesC

Calculate sine of an angle in degrees. (Domain: trigonometry, Category: basic_functions)

Inputs: angle_degrees (required).

sinhA

Calculate hyperbolic sine with high precision and overflow protection. (Domain: trigonometry, Category: hyperbolic)

Inputs: x (required).

sin_seriesC

Compute sine function using Taylor series expansion (Domain: numerical, Category: series)

Inputs: x (required), n (required).

solovay_strassen_testC

Solovay-Strassen probabilistic primality test using Jacobi symbols. (Domain: arithmetic, Category: advanced_primality)

Inputs: n (required), k.

solve_linear_diophantineC

Solve linear Diophantine equation ax + by = c for integer solutions. (Domain: arithmetic, Category: diophantine_equations)

Inputs: a (required), b (required), c (required).

solve_linear_recurrenceC

Solve general linear recurrence relation with given coefficients and initial values. (Domain: arithmetic, Category: recursive_sequences)

Inputs: coeffs (required), initial (required), n (required).

solve_negative_pell_equationC

Solve negative Pell's equation x² - ny² = -1. (Domain: arithmetic, Category: diophantine_equations)

Inputs: n (required).

solve_pell_equationC

Solve Pell's equation x² - ny² = 1 for fundamental solution. (Domain: arithmetic, Category: diophantine_equations)

Inputs: n (required).

solve_quadratic_diophantineC

Solve general quadratic Diophantine equation ax² + bxy + cy² + dx + ey + f = 0. (Domain: arithmetic, Category: diophantine_equations)

Inputs: coeffs (required), bounds (required).

sort_numbersC

Sort a list of numbers in ascending or descending order. (Domain: arithmetic, Category: comparison)

Inputs: numbers (required), descending.

spring_oscillationC

Analyze spring-mass oscillation system. (Domain: trigonometry, Category: applications)

Inputs: mass (required), spring_constant (required), amplitude (required), phase.

sqrtC

Calculate the square root of a number. (Domain: arithmetic, Category: core)

Inputs: x (required).

sqrt2A

Get √2 ā‰ˆ 1.41421. Square root of 2, first known irrational number. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

sqrt3A

Get √3 ā‰ˆ 1.73205. Square root of 3, appears in equilateral triangles. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

sqrt5A

Get √5 ā‰ˆ 2.23607. Square root of 5, appears in golden ratio formula. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

sqrt_cf_expansionA

Find continued fraction expansion of √n (periodic for non-perfect squares). (Domain: arithmetic, Category: continued_fractions)

Inputs: n (required).

square_numbersA

Generate the first n square numbers (1, 4, 9, 16, 25, ...). nth square number = n². (Domain: arithmetic, Category: general)

Inputs: n (required).

square_pyramidal_numberC

Calculate the nth square pyramidal number. (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required).

standard_deviationC

Calculate the standard deviation of a list of numbers. The square root of variance, showing typical deviation from mean. (Domain: statistics, Category: general)

Inputs: numbers (required), population.

star_numberC

Calculate the nth star number (6-pointed star). (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required).

stationarity_testC

Test time series for stationarity using basic statistical measures (Domain: timeseries, Category: analysis)

Inputs: data (required).

stern_brocot_treeC

Generate path through Stern-Brocot tree to reach target fraction. (Domain: arithmetic, Category: farey_sequences)

Inputs: target_p (required), target_q (required).

stirling_firstC

Calculate Stirling number of the first kind s(n,k) - FIXED IMPLEMENTATION. (Domain: arithmetic, Category: combinatorial_numbers)

Inputs: n (required), k (required).

stirling_secondC

Calculate Stirling number of the second kind S(n,k). (Domain: arithmetic, Category: combinatorial_numbers)

Inputs: n (required), k (required).

stirling_second_rowB

Generate row n of Stirling numbers of the second kind. (Domain: arithmetic, Category: combinatorial_numbers)

Inputs: n (required).

strong_pseudoprime_testC

Test if a number is a strong pseudoprime to given bases. (Domain: arithmetic, Category: advanced_primality)

Inputs: n (required), bases (required).

subfactorialA

Calculate subfactorial !n (derangements of n items). (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

subtractA

Subtract the second number from the first number. (Domain: arithmetic, Category: core)

Inputs: a (required), b (required).

sum_difference_formulasC

Calculate trigonometric functions using sum and difference formulas. (Domain: trigonometry, Category: identities)

Inputs: a (required), b (required), operation.

sum_digit_powersC

Calculate sum of digit powers for analysis. (Domain: arithmetic, Category: special_numbers)

Inputs: n (required), power (required).

sum_of_four_squaresC

Express a number as sum of four squares (Lagrange's theorem). (Domain: arithmetic, Category: additive_number_theory)

Inputs: n (required).

sum_of_two_squaresC

Express a number as sum of two squares if possible. (Domain: arithmetic, Category: additive_number_theory)

Inputs: n (required).

sum_of_two_squares_allC

Represent integer as sum of two squares x² + y². (Domain: arithmetic, Category: diophantine_equations)

Inputs: n (required).

sum_productC

Calculate the sum of products of corresponding elements in multiple arrays. (Domain: arithmetic, Category: general)

Inputs: arrays (required).

sum_squaresC

Calculate the sum of squares of numbers in a list. (Domain: arithmetic, Category: general)

Inputs: numbers (required).

sylvester_expansion_of_oneC

Express 1 as sum of unit fractions using Sylvester's sequence. (Domain: arithmetic, Category: egyptian_fractions)

Inputs: terms (required).

sylvester_sequenceC

Generate the first n terms of Sylvester's sequence. (Domain: arithmetic, Category: egyptian_fractions)

Inputs: n (required).

tanA

Calculate tangent of an angle in radians with singularity handling. (Domain: trigonometry, Category: basic_functions)

Inputs: angle (required).

tan_degreesC

Calculate tangent of an angle in degrees. (Domain: trigonometry, Category: basic_functions)

Inputs: angle_degrees (required).

tanhB

Calculate hyperbolic tangent with saturation handling. (Domain: trigonometry, Category: hyperbolic)

Inputs: x (required).

tauB

Get tau (Ļ„) ā‰ˆ 6.28318. Equal to 2Ļ€, represents a full turn in radians. (Domain: arithmetic, Category: general)

Inputs: no named parameters.

taxi_numbersC

Find all taxi numbers (sums of two cubes in multiple ways) up to limit. (Domain: arithmetic, Category: special_numbers)

Inputs: limit (required), min_ways.

taylor_seriesC

Compute Taylor series expansion of a function around a point (Domain: numerical, Category: series)

Inputs: f (required), derivatives (required), a (required), x (required), +1 more.

tetrahedral_numberC

Calculate the nth tetrahedral number (sum of first n triangular numbers). (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

tetranacci_numberC

Calculate the nth Tetranacci number (4th order Fibonacci). (Domain: arithmetic, Category: recursive_sequences)

Inputs: n (required).

tonelli_shanksB

Solve x² ≔ a (mod p) using Tonelli-Shanks algorithm. (Domain: arithmetic, Category: modular_arithmetic)

Inputs: a (required), p (required).

trend_strengthC

Measure strength of trend component in time series (Domain: timeseries, Category: analysis)

Inputs: data (required).

triangular_numberB

Calculate the nth triangular number T_n = n(n+1)/2. (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

triangular_numbersB

Generate the first n triangular numbers (1, 3, 6, 10, 15, ...). nth triangular number = n(n+1)/2. (Domain: arithmetic, Category: general)

Inputs: n (required).

triangular_pyramidal_numberC

Calculate the nth triangular pyramidal number (tetrahedral). (Domain: arithmetic, Category: figurate_numbers)

Inputs: n (required).

triangular_sequenceC

Generate the first n triangular numbers. (Domain: arithmetic, Category: basic_sequences)

Inputs: n (required).

triangulationC

Solve triangulation problem to find position from known distances to reference points. (Domain: trigonometry, Category: applications)

Inputs: point1 (required), point2 (required), distance1 (required), distance2 (required).

tribonacci_numberB

Calculate the nth Tribonacci number T_n. (Domain: arithmetic, Category: recursive_sequences)

Inputs: n (required).

triple_scalar_productC

Calculate the triple scalar product of three 3D vectors (Domain: linear_algebra.vectors, Category: general)

Inputs: vector_a (required), vector_b (required), vector_c (required).

triple_vector_productC

Calculate the triple vector product aƗ(bƗc) (Domain: linear_algebra.vectors, Category: general)

Inputs: vector_a (required), vector_b (required), vector_c (required).

truncateA

Truncate a number towards zero (remove decimal part). (Domain: arithmetic, Category: core)

Inputs: x (required).

t_test_one_sampleC

Perform one-sample t-test to test whether sample mean differs significantly from population mean (Domain: statistics, Category: inference)

Inputs: data (required), population_mean (required), alpha.

t_test_two_sampleC

Perform two-sample t-test (independent samples) to test whether two sample means differ significantly (Domain: statistics, Category: inference)

Inputs: data1 (required), data2 (required), alpha, equal_variance.

twin_prime_conjecture_dataC

Collect data about twin prime conjecture up to limit. (Domain: arithmetic, Category: prime_conjectures)

Inputs: limit (required), return_all_pairs.

twin_prime_gapsC

Find gaps between consecutive twin prime pairs. (Domain: arithmetic, Category: prime_gaps)

Inputs: limit (required).

twin_prime_pairsC

Find twin prime pairs up to limit. (Domain: arithmetic, Category: special_primes)

Inputs: limit (required).

two_unit_fraction_representationsC

Find all ways to represent a small fraction as sum of two unit fractions. (Domain: arithmetic, Category: egyptian_fractions)

Inputs: numerator (required), denominator (required), limit.

ulam_spiral_analysisC

Generate data for Ulam spiral prime visualization. (Domain: arithmetic, Category: prime_analysis)

Inputs: size (required).

uniform_sampleC

Generate random samples from the uniform distribution (Domain: probability, Category: general)

Inputs: n (required), a, b, seed.

unit_fraction_sumC

Sum a list of unit fractions and return the result as a reduced fraction. (Domain: arithmetic, Category: egyptian_fractions)

Inputs: denominators (required).

validate_number_in_baseC

Validate if a number string is valid in the given base. (Domain: arithmetic, Category: number_systems)

Inputs: number (required), base (required).

vampire_numbersC

Find all vampire numbers up to limit. (Domain: arithmetic, Category: special_numbers)

Inputs: limit (required).

varianceC

Calculate the sample variance of a list of numbers. Measures how spread out the numbers are from the mean. (Domain: statistics, Category: general)

Inputs: numbers (required), population.

vector_addC

Add two vectors element-wise (Domain: linear_algebra.vectors, Category: general)

Inputs: vector_a (required), vector_b (required).

vector_angleC

Calculate the angle between two vectors in radians (Domain: linear_algebra.vectors, Category: general)

Inputs: vector_a (required), vector_b (required), degrees.

vector_normC

Calculate the norm (magnitude) of a vector (Domain: linear_algebra.vectors, Category: general)

Inputs: vector (required), p.

vector_projectionC

Project one vector onto another (Domain: linear_algebra.vectors, Category: general)

Inputs: vector_a (required), vector_b (required).

vector_rejectionC

Calculate vector rejection (component perpendicular to another vector) (Domain: linear_algebra.vectors, Category: general)

Inputs: vector_a (required), vector_b (required).

vectors_orthogonalC

Check if two vectors are orthogonal (perpendicular) (Domain: linear_algebra.vectors, Category: general)

Inputs: vector_a (required), vector_b (required), tolerance.

vectors_parallelC

Check if two vectors are parallel (or anti-parallel) (Domain: linear_algebra.vectors, Category: general)

Inputs: vector_a (required), vector_b (required), tolerance.

vector_subtractC

Subtract one vector from another element-wise (Domain: linear_algebra.vectors, Category: general)

Inputs: vector_a (required), vector_b (required).

verify_hyperbolic_identityC

Verify hyperbolic identity: cosh²(x) - sinh²(x) = 1. (Domain: trigonometry, Category: hyperbolic)

Inputs: x (required), tolerance.

verify_identityC

Verify a trigonometric identity numerically at multiple test points. (Domain: trigonometry, Category: identities)

Inputs: identity_name (required), test_angles, tolerance.

verify_inverse_hyperbolic_identitiesC

Verify inverse hyperbolic function identities. (Domain: trigonometry, Category: inverse_hyperbolic)

Inputs: x (required), tolerance.

verify_sum_difference_formulasC

Verify sum and difference formulas by comparison with direct calculation. (Domain: trigonometry, Category: identities)

Inputs: a (required), b (required), operation, tolerance.

von_mangoldt_functionC

Calculate the von Mangoldt function Ī›(n). (Domain: arithmetic, Category: arithmetic_functions)

Inputs: n (required).

waring_representationC

Express a number as sum of k-th powers (Waring's problem). (Domain: arithmetic, Category: additive_number_theory)

Inputs: n (required), k (required).

wave_amplitude_analysisC

Analyze amplitude and phase of a general sinusoidal wave. (Domain: trigonometry, Category: wave_analysis)

Inputs: amplitude (required), frequency (required), phase.

wave_equationC

Generate points for a sinusoidal wave equation. (Domain: trigonometry, Category: wave_analysis)

Inputs: amplitude (required), frequency (required), phase, duration, +2 more.

wave_interferenceC

Analyze wave interference patterns between two or more waves. (Domain: trigonometry, Category: applications)

Inputs: waves (required), time_points.

weak_goldbach_checkC

Check weak Goldbach conjecture: every odd integer > 5 is sum of three primes. (Domain: arithmetic, Category: additive_number_theory)

Inputs: n (required).

weighted_moving_averageC

Compute Weighted Moving Average (WMA) - applies custom weights to recent observations (Domain: timeseries, Category: analysis)

Inputs: data (required), weights (required).

wheel_sieveC

Wheel sieve using wheel factorization for improved efficiency. (Domain: arithmetic, Category: sieve_algorithms)

Inputs: limit (required), wheel_primes.

whole_numbersC

Generate whole numbers (non-negative integers) in a given range. (Domain: arithmetic, Category: number_systems)

Inputs: start, end.

wilcoxon_signed_rankB

Perform Wilcoxon signed-rank test (non-parametric paired test) to test whether paired samples differ significantly (Domain: statistics, Category: inference)

Inputs: before (required), after (required), alpha.

wilson_factorial_modC

Calculate k! mod m efficiently for Wilson's theorem. (Domain: arithmetic, Category: primality_tests)

Inputs: k (required), m (required).

wilson_theorem_checkC

Check Wilson's theorem: p is prime iff (p-1)! ≔ -1 (mod p). (Domain: arithmetic, Category: primality_tests)

Inputs: n (required).

wilson_theorem_testB

Test primality using Wilson's theorem: (n-1)! ≔ -1 (mod n) iff n is prime. (Domain: arithmetic, Category: wilson_theorem)

Inputs: n (required).

wilson_theorem_verifyC

Verify Wilson's theorem for a given prime with detailed calculation. (Domain: arithmetic, Category: wilson_theorem)

Inputs: p (required).

z_scoresC

Calculate z-scores for a dataset (standardized values) (Domain: statistics, Category: general)

Inputs: numbers (required).

z_testC

Perform z-test for known population standard deviation to test whether sample mean differs from population mean (Domain: statistics, Category: inference)

Inputs: data (required), population_mean (required), population_std (required), alpha.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.8/5.0

    Scored across 641 tools

    Disambiguation4/5

    The tools are highly specialized with clear distinctions in their mathematical domains (e.g., arithmetic, trigonometry, statistics), and descriptions provide precise scopes. However, some overlap exists in areas like prime testing (e.g., multiple primality tests) and trigonometric functions (e.g., degrees vs. radians variants), which could cause minor confusion despite detailed descriptions.

    Naming Consistency5/5

    Tool names follow a consistent snake_case pattern throughout, with clear verb_noun or descriptive noun structures (e.g., 'compute_pi_chudnovsky', 'is_prime', 'harmonic_mean'). There are no deviations in naming conventions, making the set predictable and readable.

    Tool Count1/5

    With 641 tools, the count is extremely excessive for any coherent server purpose, far beyond the typical well-scoped range of 3-15 tools. This overwhelms the domain of 'MCP Math Server' and suggests a lack of focus, making it impractical for agent use due to information overload.

    Completeness5/5

    The tool set is remarkably comprehensive, covering a vast array of mathematical domains from basic arithmetic to advanced number theory, statistics, and trigonometry. There are no apparent gaps; it includes CRUD-like operations, constants, algorithms, and utilities across all mentioned categories, ensuring complete coverage for mathematical computations.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A Python-based MCP server providing mathematical computation tools and plotting utilities for a wide range of math topics including calculus, matrix operations, statistics, and more.
      22
      13 PyPI
      5
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A comprehensive MCP server providing 21+ tools for mathematical operations, string manipulation, file handling, utilities, and web requests via FastAPI and WebSocket.
      -
    • A
      license
      B
      quality
      D
      maintenance
      High-precision mathematics server for MCP clients, providing exact integer arithmetic, symbolic derivatives, and numerical calculus via LaTeX-style input.
      6
      8 npm
      2
      MIT