numtxt
======
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.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
Raw data
{
"_id": null,
"home_page": "http://github.com/Electrostatus/numtxt",
"name": "numtxt",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "approximation written word number name numeral si prefix cardinal ordinal precedence",
"author": "Philip Herd",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/54/27/00169dd195f01fc62d9cb7d978a048312069d8b736e62f9643de3625c3d4/numtxt-1.3.0.tar.gz",
"platform": null,
"description": "numtxt\n======\nA pure Python module that gives both full and approximate names for numbers\n\nContains 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').\n\nSuffix Styles\n-------------\n- **short**\n - Assigns 'illion' to names. This is the default style.\n\n - 10^6 = million, 10^9 = billion, 10^12 = trillion, ...\n- **long**\n - Assigns 'illion' or 'illiard' to names depending on power.\n\n - 10^6 = million, 10^9 = milliard, 10^12 = billion, ...\n- **british**\n - Assigns 'illion' and adds 'thousand' in front of names depending on power.\n\n - 10^6 = million, 10^9 = thousand million, 10^12 = billion, ...\n\n\nNaming Methods\n--------------\n- **conway-wechsler**\n - 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.\n\n - 10^6 = 1 million\n - 10^12 = 1 trillion\n - 10^51 = 1 sedecillion\n - 10^342 = 1 tredecicentillion\n- **noll**\n - This system extends the normal Latin naming method indefinitely. Can use long, short or British suffix styles (examples below are short style).\n\n - 10^6 = 1 million\n - 10^12 = 1 trillion\n - 10^51 = 1 sexdecillion\n - 10^342 = 1 centredecillion\n- **rowlett**\n - 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.\n\n - 10^6 = 1 million\n - 10^12 = 1 gillion\n - 10^51 = 1 heptadekillion\n - 10^342 = 1 hecatodekatetrillion\n- **knuth**\n - 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).\n\n - 10^6 = 100 myriad\n - 10^12 = 10 myllion\n - 10^51 = 1000 byllion tryllion\n - 10^342 = 100 myriad byllion quadryllion sextyllion\n\n\nVersion History\n---------------\n- **1.3.0**\n January 20th, 2024\n\n - adjusted si and approx functions to handle formatting options that include the sign (E.G. fmt='{:+8.03f}')\n - 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')\n- **1.2.4**\n January 20th, 2023\n\n - added new si prefixes\n- **1.2.3**\n January 20th, 2021\n\n - VERSION switched to __version__\n - this module's 4th birthday\n- **1.2.2**\n October 12th, 2020\n\n - fixed (again) approx handling of zero\n- **1.2.1**\n October 1st, 2020\n\n - restored approx handling of small values\n- **1.2.0**\n August 2nd, 2020\n\n - added formatting option to approx function\n - Fixed si handling of zero\n - table, gen10_dict and gen1k_dict functions added in previous version made public\n- **1.1.1**\n January 10th, 2020\n\n - Added si prefix function\n - Minor adjustments\n- **1.1.0**\n August 18th, 2019\n\n - Added precedence function (primary, secondary, tertiary, ...)\n - Added prefix function\n - Log function can now be overridden by third-party modules (gmpy2, mpmath) to allow compatibility\n - Added (t)uple function (single, double, triple, ...)\n - Added cardinal function call; identical to name function\n - Added version history to README\n- **1.0.2**\n November 29th, 2017\n\n - Fixed approx handling of zero & removed approx handling of small values\n- **1.0.1**\n January 20th, 2017\n\n - Modified readme/setup.py for correct pip installation\n- **1.0.0**\n January 20th, 2017\n\n - Initial release\n\n\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "gives full and approximate written forms of numbers",
"version": "1.3.0",
"project_urls": {
"Homepage": "http://github.com/Electrostatus/numtxt"
},
"split_keywords": [
"approximation",
"written",
"word",
"number",
"name",
"numeral",
"si",
"prefix",
"cardinal",
"ordinal",
"precedence"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "43940fd90d9b2399972a727307b9fba24d76134c62454d08334a1fcdf5e8b7b1",
"md5": "fd1d8a30210ff26994124391c6309c98",
"sha256": "adbf409d06387dbf0640633e17f248891a0608f7eb054ca8390457d66e2fe811"
},
"downloads": -1,
"filename": "numtxt-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fd1d8a30210ff26994124391c6309c98",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 25599,
"upload_time": "2024-01-20T13:39:43",
"upload_time_iso_8601": "2024-01-20T13:39:43.496174Z",
"url": "https://files.pythonhosted.org/packages/43/94/0fd90d9b2399972a727307b9fba24d76134c62454d08334a1fcdf5e8b7b1/numtxt-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "542700169dd195f01fc62d9cb7d978a048312069d8b736e62f9643de3625c3d4",
"md5": "d96df7a58a9a0832bb7e0c801e4aa080",
"sha256": "cc4e1695edd7c362d851adbb4ab9c5ff900ab1e3f8c15f50b0d82bd2e49e3719"
},
"downloads": -1,
"filename": "numtxt-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "d96df7a58a9a0832bb7e0c801e4aa080",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 25287,
"upload_time": "2024-01-20T13:39:45",
"upload_time_iso_8601": "2024-01-20T13:39:45.089501Z",
"url": "https://files.pythonhosted.org/packages/54/27/00169dd195f01fc62d9cb7d978a048312069d8b736e62f9643de3625c3d4/numtxt-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-20 13:39:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Electrostatus",
"github_project": "numtxt",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "numtxt"
}