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”
Metadata
Release files for numsys 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| numsys-1.0.1.tar.gz | 37.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| numsys-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 75.3 kB
Release files / numsys-1.0.1.tar.gz
| Download URL | numsys-1.0.1.tar.gz |
|---|---|
| Size | 37.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9cb487ff2214e0ae31c8faba682df1e5500d60bad467aac6199139bd028a66f
|
|
BLAKE2b-256 checksum How to use checksums |
527fc92bb88d7068bf9ec96ec79ade81442e7311061e51b1d3610db2f87fd357
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10
|
Release files / numsys-1.0.1-py3-none-any.whl
| Download URL | numsys-1.0.1-py3-none-any.whl |
|---|---|
| Size | 38.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2bcf79805295e7d099149a6db31fac10f63a4cc348d05f7f57c81ce97200443f
|
|
BLAKE2b-256 checksum How to use checksums |
643641753d467dbc97509b1c6aef5af0ddb971b21447b742e6c2fc3062efa7d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10
|