Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Convert raw numbers into metric system amounts for human readability
ResourceFunction["MetricNumberString"][x] returns a human-readable version of the given number x. |
| "Decimals" | Automatic | the number of decimal places after the decimal point |
| NumberPoint | "." | the decimal point character; e.g. in South Africa you might use a comma |
| "PrefixFunction" | Identity | custom function which is given the computed prefix and formats a string |
| "PrefixShort" | True | use short prefixes instead of long; e.g. "m" for "mega" |
| "Spacer" | " " | string that goes in between the number and unit |
Convert a number to a readable approximation with metric prefixes:
| In[1]:= |
| Out[1]= |
MetricSize gives unique prefixes up to an octillion (1027):
| In[2]:= |
| Out[2]= | ![]() |
Control the number of digits after the decimal point:
| In[3]:= |
| Out[3]= |
Use long prefixes:
| In[4]:= |
| Out[4]= |
Change the spacing between the number and unit:
| In[5]:= |
| Out[5]= |
Change the label formatting:
| In[6]:= |
| Out[6]= |
Display memory in use in human-readable form:
| In[7]:= |
| Out[7]= |
MetricSize will round in some cases, unless all decimals are asked for:
| In[8]:= |
| Out[8]= |
This work is licensed under a Creative Commons Attribution 4.0 International License