Skip to main content

A base-27 numeral system using the 26 letters of the latin alphabet

Project description

Vigintiseptimal Latin

A base-27 numeral system using the 26 letters of the latin alphabet and the ° symbol as zero.

Symbol ° a b c d e f g h i j k l m n o p q r s t u v w x y z
Value 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

Installation

pip install vigintiseptimal-latin

Usage

Python

from vigintiseptimal_latin import calc

calc("a+b")        # "c"       (1 + 2 = 3)
calc("a+b*c")      # "g"       (1 + 2*3 = 7, precedence)
calc("(a+b)*c")    # "i"       ((1+2)*3 = 9, parentheses)
calc("c^c")        # "a°"      (3^3 = 27)
calc("d/b")        # "b"       (4 / 2 = 2)
calc("g%c")        # "a"       (7 % 3 = 1)
calc("a.n+b.n")    # "d.a"     (decimals)

Conversion functions

from vigintiseptimal_latin import letters_to_number, number_to_letters

letters_to_number("abc")      # Fraction(786)    (1*27² + 2*27 + 3)
number_to_letters(786)         # "abc"
letters_to_number("a.i")      # Fraction(4, 3)   (1 + 9/27 = 4/3)

Command line

vigintiseptimal "a+b*c"
# g

Operators

Operator Description Example Result
+ Addition a+b c
- Subtraction c-a b
* Multiplication b*c f
/ Division d/b b
% Modulo g%c a
^ Power c^c
() Parentheses (a+b)*c i

Precedence: ^ > *, /, % > +, -

Negative numbers are prefixed with -:

calc("a-c")    # "-b"   (1 - 3 = -2)
calc("-b+c")   # "a"    (-2 + 3 = 1)

Precision

Calculations use Python's Fraction for exact arithmetic — no floating-point errors.

Only fractions whose denominator is a power of 3 terminate in base 27 (since 27 = 3³). Non-terminating fractions are displayed truncated to 10 digits by default.

Fraction Base 10 Base 27 Terminates?
1/3 0.333... °.i Yes (9/27)
1/9 0.111... °.c Yes (3/27)
1/2 0.5 °.mmmmmm... No

License

MIT

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

vigintiseptimal_latin-1.0.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

vigintiseptimal_latin-1.0.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file vigintiseptimal_latin-1.0.0.tar.gz.

File metadata

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

File hashes

Hashes for vigintiseptimal_latin-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8ba6e1f27c50077a2c873d600114087bfc0ae19a5c582fdf685d192f069e2b77
MD5 77ab8c4647cb15deffa7f2e2c542d367
BLAKE2b-256 90d12d3d3ff5d720a9eed4a84a9ef87f673aa76cad7aa85fe7b24d6daca935f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for vigintiseptimal_latin-1.0.0.tar.gz:

Publisher: publish.yml on oxoSNAKEoxo/vigintiseptimal_latin

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

File details

Details for the file vigintiseptimal_latin-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for vigintiseptimal_latin-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e995c7ed1a9f4503d0a68e86e53c6446d01298e0d86dd4385a32807020cc32cb
MD5 911461fbd72a502aaa64533f9fa04936
BLAKE2b-256 b30c18b62f95212a36f534388b06069b8cc97425963b8bb29e72ba5adb072377

See more details on using hashes here.

Provenance

The following attestation bundles were made for vigintiseptimal_latin-1.0.0-py3-none-any.whl:

Publisher: publish.yml on oxoSNAKEoxo/vigintiseptimal_latin

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