pretty-number
Format number so it gets more humane format.
Usage
const pretty = ; //10²¹ //1.2 × 10²¹ //1 //0 //−1 //1.555 × 10²⁰ //1.555 × 10⁻¹⁵ //∞ //−∞ //7.297 352 5664 × 10⁻³ //72 973 525.664 //0.123 //−0.123 //1.5 //−1.5 //10¹⁰⁰ //−10¹⁰⁰ //10⁻¹⁰⁰ //−10⁻¹⁰⁰ //indicate wishful precision //0 //−0.000 000 005
Formatting can be modified via constants:
prettymultSign = '×';prettyminusSign = '−';prettyspaceSign = ' ';prettyfractSign = '.';prettyprecision = 9;
Note also that to make result look good custom font may be needed.
Related
mumath — set of practical math utils