Skip to main content

bignum

A Python module for representing and computing with extremely large or extremely small numbers using a structured scientific-notation system instead of native numeric types.

Unlike standard floats or integers, bignum stores numbers as dictionaries containing sign, mantissa, exponent, exponent sign, magnitude layer, and imaginary flag. This allows it to represent values far beyond Python’s built-in numeric limits while still supporting arithmetic and mathematical functions.


Features

  • Arbitrary-scale number representation
  • Supports exponent layers (e, ee, eee, …)
  • Arithmetic operations
  • Logarithms and exponentials
  • Roots and powers
  • Factorials
  • Imaginary number support
  • Configurable precision
  • Safe mode for preventing expensive operations

Number Format

Each number is stored internally as:

{
  'sign': '+' | '-',
  'mantissa': float,
  'exponent': int,
  'exponentsign': '+' | '-',
  'magnitude': int,
  'imaginary': bool
}

Example:

1e10 → +1.0e10
1ee10 → +1.0ee10

Magnitude represents repeated exponent layers.


Installation

pip install bignum

Quick Example

from bignum import *

a = fromInteger(4000)
b = fromInteger(200)

print(toScientific(addBignum(a, b)))

Output:

+4.2e3

Supported Operations

Arithmetic

  • addBignum
  • subBignum
  • multBignum
  • divBignum

Math Functions

  • lnBignum
  • Log10
  • Logx
  • expBignum
  • sqrtBignum
  • cubrtBignum
  • nthrtBignum
  • factBignum

Utilities

  • compareBignum
  • roundBignum
  • floorBignum
  • absBignum
  • recipBignum
  • isZero

Configuration

The module includes configurable globals:

Variable Description
SF Significant figures (default 5)
SafeMode Prevents very expensive calculations

Limitations

  • toInteger() only converts values between 1e-10 and 1e10.
  • Precision depends on floating-point mantissa accuracy.
  • Some operations are restricted when SafeMode is enabled.

Use Cases

bignum is useful for:

  • Scientific experimentation
  • Simulating extreme growth systems
  • Studying large exponent structures
  • Mathematical modeling beyond float limits

License

See LICENSE.txt for details.

Metadata

Release files for aurea-bignum-library-python 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for aurea-bignum-library-python 0.1.0
File Interpreter ABI Platform
aurea_bignum_library_python-0.1.0-py3-none-any.whl Python 3 none any Details

Release files / aurea_bignum_library_python-0.1.0-py3-none-any.whl

Download URL aurea_bignum_library_python-0.1.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0adcccd991531f848a6798070ceb9204134831d86c6f749943de4ca98557dc31
BLAKE2b-256 checksum
How to use checksums
45fdc1c3bc48733ecd79b47f636c8cefbed2261c01ca1940130e3ce8cb499237
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for aurea-bignum-library-python 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page