Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] big number calculation to small number using Python
- Date: Wed, 24 Mar 2021 18:06:34 +0900
- From: "Stephen J. Turnbull" <turnbull.stephen.fw@example.com>
- Subject: Re: [tlug] big number calculation to small number using Python
- References: <CAMyPCTSYgGyjrctN3P67KJ+9F76qRu_DSN7Q=F91Map3Pc3y7w@mail.gmail.com> <bb6b7debf4b4cc5fb6c559beff66d3ce@jp.sometwo.net> <CAMyPCTRAd6_yUsAwZmrQ+-H-L3tdFDWNjSs1CUN40ZgZZZ8T-A@mail.gmail.com> <20210322201454.577615bc@pear.local>
jep200404@example.com writes: > On Mon, 22 Mar 2021 23:54:32 +0000, James Tobin <jamesbtobin@example.com> wrote: > > > 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+ > Fuss with using e, f, or g conversion code. In JavaScript, I guess first parseFloat to get a floating point number from the user's input (not sure what happens if a number is too big for the precision available to floats, and I hope it handles integers), then toExponential(n) where n is the precision you want displayed. This is my first ever attempt at designing a JavaScript program. ;-) Google taught me everything I know about it .... Steve
- References:
- [tlug] big number calculation to small number using javascript
- From: James Tobin
- Re: [tlug] big number calculation to small number using javascript
- From: furkan
- Re: [tlug] big number calculation to small number using javascript
- From: James Tobin
- Re: [tlug] big number calculation to small number using Python
- From: jep200404
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] big number calculation to small number using Python
- Next by Date: Re: [tlug] big number calculation to small number using javascript
- Previous by thread: Re: [tlug] big number calculation to small number using Python
- Next by thread: Re: [tlug] big number calculation to small number using javascript
- Index(es):