guest271314 (2019-03-07T22:05:34.000Z)
Not sure what you mean by "real world" use case. Described at least one use
case at the proposal. Statistics; graphs; number and integer manipulation
using indexes of arrays with ability to convert manipulated array back to
number.

On Thu, Mar 7, 2019 at 9:56 PM Naveen Chawla <naveen.chwl at gmail.com> wrote:

> What is the real world use case, presuming it's not just an academic
> exercise
>
> On Thu, 7 Mar 2019, 9:08 pm guest271314, <guest271314 at gmail.com> wrote:
>
>> Ability to adjust *nth* digit of an integer or decimal by adjusting
>> decimal or integer at *nth* index of array, to try to solve OEIS A217626
>> oeis.org/A217626 directly, for example
>>     ~~(128.625*9*1.074)//1243
>>     ~~(128.625*9*1.144)//1324
>> where the decimal portion can be manipulated by referencing the index of
>> an array, then converting the array back to a number.
>>
>> On Thu, Mar 7, 2019 at 8:55 PM Jeremy Martin <jmar777 at gmail.com> wrote:
>>
>>> Can you explain the motivation for this proposal?
>>>
>>> At first blush, this seems like an incredibly arbitrary pair of value
>>> conversion utilities. Are there real world applications for this?
>>>
>>> On Thu, Mar 7, 2019 at 3:43 PM guest271314 <guest271314 at gmail.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> ---------- Forwarded message ---------
>>>> From: guest271314 <guest271314 at gmail.com>
>>>> Date: Thu, Mar 7, 2019 at 8:35 PM
>>>> Subject: Proposal: 1) Number (integer or decimal) to Array 2) Array to
>>>> Number (integer or decimal)
>>>> To: <es-discuss at mozilla.org>
>>>>
>>>>
>>>> Original concept: Integer or decimal to array and array to decimal or
>>>> integer https://codegolf.meta.stackexchange.com/a/17223
>>>>
>>>> Proof of concept (with bugs)
>>>>
>>>> function numberToArray(n) {
>>>>
>>>>   if (Math.abs(n) == 0 || Math.abs(n) == -0) {
>>>>     return [n]
>>>>   }
>>>>
>>>>   const r = [];
>>>>
>>>>   let [
>>>>     a, int = Number.isInteger(a), d = g = [], e = i = 0
>>>>   ] = [ n || this.valueOf()];
>>>>
>>>>   if (!int) {
>>>>     let e = ~~a;
>>>>     d = a - e;
>>>>     do {
>>>>       if (d < 1) ++i;
>>>>       d *= 10;
>>>>     } while (!Number.isInteger(d));
>>>>   }
>>>>
>>>>   for (; ~~a; r.unshift(~~(a % 10)), a /= 10);
>>>>
>>>>   if (!int) {
>>>>     for (; ~~d; g.unshift(~~(d % 10)), d /= 10);
>>>>     g[0] = g[0] * (1 * (10 ** -i))
>>>>     r.push(...g);
>>>>   }
>>>>
>>>>   return r;
>>>> }
>>>> function arrayToNumber(a) {
>>>>   if ((Math.abs(a[0]) == 0 || Math.abs(a[0]) == -0)
>>>>      && a.length == 1)
>>>>
>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20190307/604b5676/attachment-0001.html>
guest271314 at gmail.com (2019-03-07T22:12:31.439Z)
Not sure what you mean by "real world" use case. Described at least one use
case at the proposal. Statistics; graphs; mathematics; number (integer and decimal) manipulation
using indexes of arrays with ability to convert manipulated array back to
number and vice versa.

For example, if the requirement is to add or subtract the *n*th digit of 3.141592653589793, the irrational number can be converted to an array, then the *n*th decimal can be added or subtracted, if necessary, manipulation can also be performed on the adjacent indexes of the array, then the array can be converted back to a JavaScript number.
guest271314 at gmail.com (2019-03-07T22:12:03.711Z)
Not sure what you mean by "real world" use case. Described at least one use
case at the proposal. Statistics; graphs; mathematics; number (integer and decimal) manipulation
using indexes of arrays with ability to convert manipulated array back to
number and vice versa.

For example, if the requirement is to add or subtract the *n*th digit of 3.141592653589793, to irrational number can be converted to an array, then the *n*th decimal can be added or subtracted, if necessary, manipulation can also be performed on the adjacent indexes of the array, then the array can be converted back to a JavaScript number.
guest271314 at gmail.com (2019-03-07T22:11:39.757Z)
Not sure what you mean by "real world" use case. Described at least one use
case at the proposal. Statistics; graphs; mathematics; number (integer and decimal) manipulation
using indexes of arrays with ability to convert manipulated array back to
number and vice versa.

For example, if the requirement is to add or subtract the **n**th digit of 3.141592653589793, to irrational number can be converted to an array, then the **n**th decimal can be added or subtracted, if necessary, manipulation can also be performed on the adjacent indexes of the array, then the array can be converted back to a JavaScript number.
guest271314 at gmail.com (2019-03-07T22:08:34.873Z)
Not sure what you mean by "real world" use case. Described at least one use
case at the proposal. Statistics; graphs; mathematics; number (integer and decimal) manipulation
using indexes of arrays with ability to convert manipulated array back to
number and vice versa.
guest271314 at gmail.com (2019-03-07T22:07:43.301Z)
Not sure what you mean by "real world" use case. Described at least one use
case at the proposal. Statistics; graphs; number (integer and decimal) manipulation
using indexes of arrays with ability to convert manipulated array back to
number and vice versa.