Skip to main content

A pure Python module that gives both full and approximate names for numbers

Contains functions that give the cardinal name (one, two, three, …), the ordinal name (first, second, third, …), the precedence (primary, secondary, tertiary, …) as well as approximations (23.3458e45 -> ‘23.346 quattuordecillion’) and prefixes. Has four different naming methods for powers and three different suffix styles. Additionally contains an SI prefix naming function and readable time-delta string function (7234 -> ‘2 hours, 34 seconds’).

Suffix Styles

  • short - Assigns ‘illion’ to names. This is the default style.

    • 10^6 = million, 10^9 = billion, 10^12 = trillion, …

  • long - Assigns ‘illion’ or ‘illiard’ to names depending on power.

    • 10^6 = million, 10^9 = milliard, 10^12 = billion, …

  • british - Assigns ‘illion’ and adds ‘thousand’ in front of names depending on power.

    • 10^6 = million, 10^9 = thousand million, 10^12 = billion, …

Naming Methods

  • conway-wechsler - This system extends the normal Latin naming method indefinitely and follows Latin syntax closely. Can use long, short or British suffix styles (examples below are short style). This is the default method.

    • 10^6 = 1 million

    • 10^12 = 1 trillion

    • 10^51 = 1 sedecillion

    • 10^342 = 1 tredecicentillion

  • noll - This system extends the normal Latin naming method indefinitely. Can use long, short or British suffix styles (examples below are short style).

    • 10^6 = 1 million

    • 10^12 = 1 trillion

    • 10^51 = 1 sexdecillion

    • 10^342 = 1 centredecillion

  • rowlett - This system uses Greek prefixes for names. Introduced to prevent confusion the suffix styles can cause and therefore does not use any such styles. Currently valid up to 10^2999.

    • 10^6 = 1 million

    • 10^12 = 1 gillion

    • 10^51 = 1 heptadekillion

    • 10^342 = 1 hecatodekatetrillion

  • knuth - Radically different naming method introduced to prevent confusion the suffix styles can cause and thus does not use any styles. Inherits conway-wechsler system to extend naming scheme indefinitely (original paper stopped at 10^4194304).

    • 10^6 = 100 myriad

    • 10^12 = 10 myllion

    • 10^51 = 1000 byllion tryllion

    • 10^342 = 100 myriad byllion quadryllion sextyllion

Version History

  • 1.3.1 February 21st, 2026

    • added shortcut function for listing number of bytes

  • 1.3.0 January 20th, 2024

    • adjusted si and approx functions to handle formatting options that include the sign (E.G. fmt=’{:+8.03f}’)

    • add interval function, accepts a number of seconds or a datetime.timedelta object and returns a readable time duration string (E.G. 7234 -> ‘2 hours, 34 seconds’)

  • 1.2.4 January 20th, 2023

    • added new si prefixes

  • 1.2.3 January 20th, 2021

    • VERSION switched to __version__

    • this module’s 4th birthday

  • 1.2.2 October 12th, 2020

    • fixed (again) approx handling of zero

  • 1.2.1 October 1st, 2020

    • restored approx handling of small values

  • 1.2.0 August 2nd, 2020

    • added formatting option to approx function

    • Fixed si handling of zero

    • table, gen10_dict and gen1k_dict functions added in previous version made public

  • 1.1.1 January 10th, 2020

    • Added si prefix function

    • Minor adjustments

  • 1.1.0 August 18th, 2019

    • Added precedence function (primary, secondary, tertiary, …)

    • Added prefix function

    • Log function can now be overridden by third-party modules (gmpy2, mpmath) to allow compatibility

    • Added (t)uple function (single, double, triple, …)

    • Added cardinal function call; identical to name function

    • Added version history to README

  • 1.0.2 November 29th, 2017

    • Fixed approx handling of zero & removed approx handling of small values

  • 1.0.1 January 20th, 2017

    • Modified readme/setup.py for correct pip installation

  • 1.0.0 January 20th, 2017

    • Initial release

Metadata

Release files for numtxt 1.3.1

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

Source distribution (sdist)

Source distribution for numtxt 1.3.1
File Size Uploaded
numtxt-1.3.1.tar.gz 25.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for numtxt 1.3.1
File Interpreter ABI Platform
numtxt-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 51.5 kB

Release files / numtxt-1.3.1.tar.gz

Download URL numtxt-1.3.1.tar.gz
Size 25.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0c13af8fbd67d72feb006aa0ee31dd6186738d8d73f2dca34db15c71b389966c
BLAKE2b-256 checksum
How to use checksums
a32ce7f1c3573db9020ee7b74b3b0974b27df52c22240f737282ad87c17eaacd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / numtxt-1.3.1-py3-none-any.whl

Download URL numtxt-1.3.1-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a11936a4e7476e67f918dcaaaf91f6059cac4c638586d2c78c04a004ad04178
BLAKE2b-256 checksum
How to use checksums
d3ca5d00eb48e1fc091b90fcad76bb3a0213f1cc7c863c8d709e8e634a47c24d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.3.0

2 release files

1.2.4

2 release files

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

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