Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] big number calculation to small number using javascript



rather than showing the true number i want to display to the user (on
the screen) the smaller (scientific notation) number, i.e. if the
input is 2222222222222222222222 display as xxxxe+

bigint just shows the true number (big) and look untidy (ugly) on the screen

the user is not constrained by how many digits they can key in which
is why i want to display the calculations (based on their input) using
smaller number equivalents

On Mon, 22 Mar 2021 at 16:08, <furkan@example.com> wrote:
>
> On 2021-03-22 17:47, James Tobin wrote:
> > 23 digit input
>
> I didn't have a chance to understand the code yet. Just as a potential
> hint;
> you might be hitting Javascript's limitations on numbers.
>
> More Info;
>
> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER
>
> Hope it helps.
>
> --
> Furkan Mustafa
> https://rainlab.co.jp


Home | Main Index | Thread Index