Skip to main content

numeral systems - number base conversion module

Project description

numeral system conversion module; converts values from one number base to another

Any real or complex number can be converted to/from a base of any real or imaginary value

Standard

representation in a positional numeral system (base ten, base sixty)

Number bases here are integers (2, 3, 10, …), negatives, (-2, -10, -25, …), reals (1.5, 3.14159, -2.71828, …) or imaginary (2i, -4.5i, 6i, …). Additionally, inverted values (0.5, -0.36788, 0.001, …) are allowed in use as a base. Invalid values as a base are 0, 1 and any value whose absolute value is 1.

Non-standard

representation in a non-positional numeral system (roman, factorial)

A non-positional numeral system is one where values do not conform to the positional system. These can be alphabetic, like Roman numerals, or a mixed base system, like factorial. Also included are positional-like bases that have limited representation; not all values can be shown. Examples of these are base one and minus one.

Digits

The first one hundred digits used (in order) are 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ \t\n\r\x0b\x0c. After this, which digits are used will be dependent on your system encoding. However, general order will be from the lowest Unicode plane to the highest (skipping already seen digits).

References

positive real base conversion: (Ref. A) A. Rényi, “Representations for real numbers and their ergodic properties”, Acta Mathematica Academic Sci. Hungar., 1957, vol. 8, pp. 433-493

negative real base conversion: (Ref. B) S. Ito, T. Sadahiro, “Beta-expansions with negative bases”, Integers, 2009, vol. 9, pp. 239-259

base 2i: (Ref. C) D. Knuth, “An Imaginary Number System”, Communications of the ACM, 1960, vol. 3, pp. 245-247

base -10: (Ref. D) V. Grünwald, “Intorno all’aritmetica dei sistemi numerici a base negativa con particolare riguardo al sistema numerico a base negativo-decimale per lo studio delle sue analogie coll’aritmetica ordinaria (decimale)”, Giornale di matematiche di Battaglini, 1885, vol. 23, pp. 203-221

imaginary base conversion/summary: (Ref. E) P. Herd, “Imaginary Number Bases”

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

numsys-0.9rc0.tar.gz (23.6 kB view details)

Uploaded Source

Built Distributions

numsys-0.9rc0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

numsys-0.9rc0-py2-none-any.whl (24.2 kB view details)

Uploaded Python 2

File details

Details for the file numsys-0.9rc0.tar.gz.

File metadata

  • Download URL: numsys-0.9rc0.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.5

File hashes

Hashes for numsys-0.9rc0.tar.gz
Algorithm Hash digest
SHA256 a85accc1589d845afdbf9ebbb4e53e0c43cb404685bec4dad6b6b8b1c84e6291
MD5 692b426cfa640b3c53fda99df9b4b9fe
BLAKE2b-256 e785028444d20b238fdb76c2c2b98eb1803c7767c1b11157f5c4b2825a53dcd8

See more details on using hashes here.

File details

Details for the file numsys-0.9rc0-py3-none-any.whl.

File metadata

  • Download URL: numsys-0.9rc0-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.5

File hashes

Hashes for numsys-0.9rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed21b5c2886bfd9f14589a501da2d07cf98889e978f6c9830dfa672e4d745aa7
MD5 467610e9d8fa6c376c5e978a7912b281
BLAKE2b-256 c5cdd990c892830f37c596f5abbd015ebc0ff12ca4435300a3045a2beba93d8a

See more details on using hashes here.

File details

Details for the file numsys-0.9rc0-py2-none-any.whl.

File metadata

  • Download URL: numsys-0.9rc0-py2-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.5

File hashes

Hashes for numsys-0.9rc0-py2-none-any.whl
Algorithm Hash digest
SHA256 590253b1b92d0b8adf4218b27f52fc576d75ee7e47354c02fee069eadacc710a
MD5 2a98396b884a0c21b4d2b1cccd778ef4
BLAKE2b-256 3efe5af6dd168c78f68de039a083b21b127281c90ee7a56d730ff57428029272

See more details on using hashes here.

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