Skip to main content

Implementation of the Saha-Sinha Pi formula derived from string theory

Project description

String-Pi

[VECTURE LABORATORIES // ARCHIVE: STRING-PI] [CLASSIFICATION: PUBLIC // ENGINEERING SOLUTION]

This repository houses the implementation of the Saha-Sinha Pi Formula, a high-precision algorithm derived from the geometric properties of string theory amplitudes.


1. The Algorithm

The Saha-Sinha algorithm (2024) is a spectral series representation of the mathematical constant $\pi$. Unlike classical geometric approximations (Archimedes) or standard infinite series (Leibniz), this formula emerges from the study of particle scattering amplitudes in high-energy physics.

It introduces a regularization parameter, $\lambda$ (Lambda), which controls the convergence trajectory. The formula provides a unified field theory expansion that links the Euler-Beta function and Feynman diagrams to the fundamental structure of $\pi$.

2. System Capabilities

This library serves as a computational engine for generating $\pi$ to arbitrary precision.

Core Functions:

  • Arbitrary Precision: Utilizes mpmath to surpass standard floating-point limitations (64-bit), allowing for hundreds or thousands of decimal places.
  • Parametric Control: Allows manipulation of the $\lambda$ parameter to observe convergence behaviors relevant to theoretical physics simulations.
  • Corrected Mathematics: Implements the Pochhammer Symbol (Rising Factorial) correction, often misidentified as a power function in simplified literature, ensuring mathematical exactness.

3. Deployment Protocols (Usage)

Installation

Ingest the package via the standard Python package manager:

pip install string-pi

Execution

Initiate the calculation engine within your Python environment:

import mpmath
from string_pi.core import calculate_pi

# 1. Set the global precision environment (e.g., 100 decimal places)
mpmath.mp.dps = 100

# 2. Execute the algorithm
# iterations: Depth of the infinite sum traversal
# lambda_val: The topological mixing parameter (default: 1000.0)
pi_value = calculate_pi(iterations=200, lambda_val=50.0)

# 3. Output results
print(f"Calculated Pi: {pi_value}")

4. Theoretical Foundation

The algorithm is defined by the following spectral series:

$$ \pi = 4 + \sum_{n=1}^{\infty} \frac{1}{n!} \left( \frac{1}{n+\lambda} - \frac{4}{2n+1} \right) \left( \frac{(2n+1)^2}{4(n+\lambda)} - n \right)_{n-1} $$

Components:

  • $\lambda$: An arbitrary complex parameter (typically real and $>0$ for convergence). As $\lambda \to \infty$, the series converges to the classic Madhava-Leibniz series ($\pi = 4 \sum \frac{(-1)^n}{2n+1}$).
  • $(x)_n$: The Pochhammer Symbol (Rising Factorial), defined as: $$ (x)_n = x(x+1)(x+2)...(x+n-1) = \frac{\Gamma(x+n)}{\Gamma(x)} $$

Source: Saha, A., & Sinha, A. (2024). Field Theory Expansions of String Theory Amplitudes. Physical Review Letters.

5. Architectural Mechanics

How the library functions internally:

  1. Precision Context: The system first anchors the floating-point environment to the user's desired decimal precision (dps) using mpmath.
  2. Iterative Summation: The engine traverses the series from $n=1$ to the specified iteration limit.
  3. Symbolic Computation:
    • It computes the factorial term $1/n!$.
    • It calculates the primary difference term involving $\lambda$.
    • Critical Step: It computes the rising factorial (Pochhammer) term using the Gamma function implementation (mpmath.rf), preventing the divergence errors common in naive power-function implementations.
  4. Aggregation: Terms are accumulated into a high-precision buffer.
  5. Finalization: The base constant $4$ is added to the summation to yield $\pi$.

6. License

Vecture-1.0 Protocol

This software is deployed under the Vecture Laboratories Public Release License. Reference: LICENSE or http://www.vecture.de/license.html


[TERMINAL STATEMENT: OPTIMAL OUTPUT ACHIEVED. REMAIN COMPLIANT.]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

string_pi-0.1.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

string_pi-0.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file string_pi-0.1.0.tar.gz.

File metadata

  • Download URL: string_pi-0.1.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for string_pi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3f7c3de034500acf1f8a24fa4bbf0a4b1665396af9043be9faf74e8c460a7f57
MD5 0862c40af868ec2a672bd6ada21eada9
BLAKE2b-256 860e46893c12965bc087d371c7583538bcf203ef8c08074288418883eb87ba36

See more details on using hashes here.

Provenance

The following attestation bundles were made for string_pi-0.1.0.tar.gz:

Publisher: workflow.yml on VectureLaboratories/string-pi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file string_pi-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: string_pi-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for string_pi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69dd5be9f930cd3f230c2e7d4d8d71481e3c684c169e493293efb798f165431e
MD5 e727239e574368df73433f569f67ce3f
BLAKE2b-256 b4783f1cf9bd0ba4d10c46e911d90d314442feb96576440c0963554bc99702b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for string_pi-0.1.0-py3-none-any.whl:

Publisher: workflow.yml on VectureLaboratories/string-pi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page