Skip to main content

Python implementation of Randall Munroe'xs variable base factoradic number system: https://xkcd.com/2835/

Project description

Variable-base Factoradic numbers

Implementation of https://xkcd.com/2835/

Installation

https://pypi.org/project/variable-base-factoradic/

pip install variable-base-factoradic

Usage

from variable_base_factoradic import from_factoradic, to_factoradic

# Convert from decimal to factoradic
to_factoradic(5038)
# Out: "654320"

# Convert from factoradic to decimal
from_factoradic("654320")
# Out: 5038

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

variable_base_factoradic-1.2.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

variable_base_factoradic-1.2-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

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