Abbreviate Large Numbers

by PopLava
Abbreviate Large Numbers
Shortens large numbers into an abbreviated form [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://PopLava.AbbreviateLargeNumbers##version=1

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:


Version 1.0
Date added: Feb 25 2019
Last updated: Feb 26 2019
0 fans
This simple library helps shrink large numbers into an abbreviated form. It can return a styled format with optional precision.

You see this format a lot in clicker/idle games.

Example: 1000000 can be abbreviated as 1M or 1.0000000000M if you're looking for greater precision.

The library provides support up to unvigintillion.

The library relies on the Asielen.RealBignum library and Nadrew_StringHandler library.


Popisfizzy: (Feb 26 2019, 8:47 pm)
The library relies on the Asielen.RealBignum library

Ugh, this library is horrendously slow. They took the easy way out and used strings IIRC, but other than ease just about every other aspect of using strings for numbers is an incredibly bad choice.

I have a WIP big numbers library on Github here which is many times faster than any similar library on BYOND, but I don't have division programmed yet so there's no good way to get to a base representation that isn't a power of 2 (binary, quaternary, octal, hexadecimal, etc.). If I ever get around to finishing it up to some reasonable level I'll give you a head's up.