guest271314 (2019-03-07T22:22:21.000Z)
Have you read the proposal, and the first response to your inquiry? It is
simpler to have the ability to add, subtract, divide, or otherwise
manipulate individual nth indexes of an integer or decimal represented as
an array of integers potentially containing one decimal than trying to
perform the same mathematical operations on a number in JavaScript
(essentially broken in JavaScript due to the floating-point number issues).

Will re-post a use case, again
~~(128.625*9*1.074)//1243
~~(128.625*9*1.144)//1324 where if the requirement is to increment the
decimal portion of 1.074 or 1.144 if the decimal is first converted to an
array, we can use array methods to tests the matches we are looking for.
For example, [1.0, 7, 4]

representation of 1.074 allows each of the portions of the number to be
adjusted independently. Since we have previously defined a .toNumber()
Array method we know we can get the value of the array as a JavaScript
number.

On Thu, Mar 7, 2019 at 10:12 PM Jeremy Martin <jmar777 at gmail.com> wrote:

> By "real world" we mean somewhere outside of a code challenge or similarly
> low utility program context.
>
> You mentioned statistics, for example. Can you reference a specific
> example from that domain where these methods would offer an advantage?
>
> On Thu, Mar 7, 2019, 5:05 PM guest271314 <guest271314 at gmail.com> wrote:
>
>> 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<span class="gmail-m_2662878951066317968m_7497912379499730396gmail-m_-49591865513921258gmail-m_191674293613409874m_-1290191079188355796gmail-pun" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;
>>>>>>
>>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20190307/dd36e46c/attachment-0001.html>
guest271314 at gmail.com (2019-03-07T22:47:19.733Z)
Cited a specific example at the proposal itself, and at the first response. From own experience trying to solve OEIS A217626 oeis.org/A217626 directly. Kindly re-read the original proposal and subsequent email to this list.


It is simpler to have the ability to add, subtract, divide, or otherwise
manipulate individual nth indexes of an integer or decimal represented as
an array of integers potentially containing one decimal than trying to
perform the same mathematical operations on a number in JavaScript
(essentially broken in JavaScript due to the floating-point number issues).

Will re-post a use case, again, which is included at the original proposal relevant to trying to solve for the *n*th permutation, or combination, *directly* (without using loops)

    ~~(128.625*9*1.074)//1243
    ~~(128.625*9*1.144)//1324 

where if the requirement is to increment the
decimal portion of 1.074 or 1.144 if the decimal is first converted to an
array, we can use array methods to tests the matches we are looking for.
For example, 

    [1.0, 7, 4]

representation of 1.074 allows each of the portions of the number to be
adjusted independently.

If the expected result is 

     1.085

we can use bracket notation

     arr[1] = arr[1] + 1
     arr[2] = arr[2] + 1

Since we have previously defined a .toNumber()
Array method we know we can get the value of the array as a JavaScript
number.

     let n = arr.toNumber() // 1.085

The same is true for 

     128.625

where that decimal as well can be manipulated as an array, converted to number and further mathematical operations can be performed with the 1.074 portion of the mathematical procedure.

If we are trying to find needles in haystacks for several million matches, for example, combinatorics, permutations - using only numbers to do so, ignoring the values - then manipulating arrays, for example, from 1.0 to 1.NNNNNNNNNN where each N can be represented as an index of an array provides greater flexibility and control over the manipulation of the decimal than relying on JavaScript Number or Math, or Number to String back to Number operations. 

Perhaps BigDecimal could address some of the issues, though the array approach allows individual digits manipulation for each digit of the array/number directly.

Posted the proposal here for your consideration. 

Am not really interested in *lobbying* for the proposal within the context of overcoming conjecture, etc.; though can and will answer questions relevant to own experiences trying to work with integers and decimals in JavaScript. 

Either people here will get the usefulness of such methods relevant to math or the people here will not. Either outcome is fine. All can do is post the proposal here. The code at the linked answer already works, to it is not a "coding challenge".
guest271314 at gmail.com (2019-03-07T22:45:25.821Z)
Cited a specific example at the proposal itself, and at the first response. From own experience trying to solve OEIS A217626 oeis.org/A217626 directly. Kindly re-read the original proposal and subsequent email to this list.


It is simpler to have the ability to add, subtract, divide, or otherwise
manipulate individual nth indexes of an integer or decimal represented as
an array of integers potentially containing one decimal than trying to
perform the same mathematical operations on a number in JavaScript
(essentially broken in JavaScript due to the floating-point number issues).

Will re-post a use case, again, which is included at the original proposal relevant to trying to solve for the *n*th permutation, or combination, *directly* (without using loops)

    ~~(128.625*9*1.074)//1243
    ~~(128.625*9*1.144)//1324 

where if the requirement is to increment the
decimal portion of 1.074 or 1.144 if the decimal is first converted to an
array, we can use array methods to tests the matches we are looking for.
For example, 

    [1.0, 7, 4]

representation of 1.074 allows each of the portions of the number to be
adjusted independently.

If the expected result is 

     1.085

we can use bracket notation

     arr[1] = arr[1] + 1
     arr[2] = arr[2] + 1

Since we have previously defined a .toNumber()
Array method we know we can get the value of the array as a JavaScript
number.

     let n = arr.toNumber() // 1.085

The same is true for 

     128.625

where that decimal as well can be manipulated as an array, converted to number and further mathematical operations can be performed with the 1.074 portion of the mathematical procedure.

If we are trying to find needles in haystacks for several million matches, for example, permutations, then manipulating arrays, for example, from 1.0 to 1.NNNNNNNNNN where each N can be represented as an index of an array provides greater flexibility and control over the manipulation of the decimal than relying on JavaScript Number or Math, or Number to String back to Number operations. 

Perhaps BigDecimal could address some of the issues, though the array approach allows individual digits manipulation for each digit of the array/number directly.

Posted the proposal here for your consideration. 

Am not really interested in *lobbying* for the proposal within the context of overcoming conjecture, etc.; though can and will answer questions relevant to own experiences trying to work with integers and decimals in JavaScript. 

Either people here will get the usefulness of such methods relevant to math or the people here will not. Either outcome is fine. All can do is post the proposal here. The code at the linked answer already works, to it is not a "coding challenge".
guest271314 at gmail.com (2019-03-07T22:43:19.237Z)
Cited a specific example at the proposal itself, and at the first response. From own experience trying to solve OEIS A217626 oeis.org/A217626 directly. Kindly re-read the original proposal and subsequent email to this list.


It is simpler to have the ability to add, subtract, divide, or otherwise
manipulate individual nth indexes of an integer or decimal represented as
an array of integers potentially containing one decimal than trying to
perform the same mathematical operations on a number in JavaScript
(essentially broken in JavaScript due to the floating-point number issues).

Will re-post a use case, again, which is included at the original proposal relevant to trying to solve for the *n*th permutation, or combination, *directly* (without using loops)

    ~~(128.625*9*1.074)//1243
    ~~(128.625*9*1.144)//1324 

where if the requirement is to increment the
decimal portion of 1.074 or 1.144 if the decimal is first converted to an
array, we can use array methods to tests the matches we are looking for.
For example, 

    [1.0, 7, 4]

representation of 1.074 allows each of the portions of the number to be
adjusted independently.

If the expected result is 

     1.085

we can use bracket notation

     arr[1] = arr[1] + 1
     arr[2] = arr[2] + 1

Since we have previously defined a .toNumber()
Array method we know we can get the value of the array as a JavaScript
number.

     let n = arr.toNumber() // 1.085

The same is true for 

     128.625

where that decimal as well can be manipulated as an array, converted to number and further mathematical operations can be performed with the 1.074 portion of the mathematical procedure.

If we are trying to find needles in haystacks for several million matches, for example, permutations, then manipulating arrays, for example, from 1.0 to 1.NNNNNNNNNN where each N can be represented as an index of an array provides greater flexibility and control over the manipulation of the decimal than relying on JavaScript Number or Math, or Number to String back to Number operations. 

Perhaps BigDecimal could address some of the issues, though the array approach allows individual digits manipulation for each digit of the array/number directly.

Posted the proposal here for your consideration. 

Am not really interested in *lobbying* for the proposal within the context of overcoming conjecture, etc., though will to an appreciable degree if necessary. Either people here will get the usefulness of such methods relevant to math or the people here will not. The code at the linked answer already works, to it is not a "coding challenge".
guest271314 at gmail.com (2019-03-07T22:40:51.793Z)
Cited a specific example at the proposal itself, and at the first response. From own experience trying to solve OEIS A217626 oeis.org/A217626 directly. Kindly re-read the original proposal and subsequent email to this list.


It is simpler to have the ability to add, subtract, divide, or otherwise
manipulate individual nth indexes of an integer or decimal represented as
an array of integers potentially containing one decimal than trying to
perform the same mathematical operations on a number in JavaScript
(essentially broken in JavaScript due to the floating-point number issues).

Will re-post a use case, again, which is included at the original proposal relevant to trying to solve for the *n*th permutation, or combination, *directly* (without using loops)

    ~~(128.625*9*1.074)//1243
    ~~(128.625*9*1.144)//1324 

where if the requirement is to increment the
decimal portion of 1.074 or 1.144 if the decimal is first converted to an
array, we can use array methods to tests the matches we are looking for.
For example, 

    [1.0, 7, 4]

representation of 1.074 allows each of the portions of the number to be
adjusted independently.

If the expected result is 

     1.085

we can use bracket notation

     arr[1] = arr[1] + 1
     arr[2] = arr[2] + 1

Since we have previously defined a .toNumber()
Array method we know we can get the value of the array as a JavaScript
number.

     let n = arr.toNumber() // 1.085

If we are trying to find needles in haystacks for several million matches, for example, permutations, then manipulating arrays, for example, from 1.0 to 1.NNNNNNNNNN where each N can be represented as an index of an array provides greater flexibility and control over the manipulation of the decimal than relying on JavaScript Number or Math, or Number to String back to Number operations. 

Perhaps BigDecimal could address some of the issues, though the array approach allows individual digits manipulation for each digit of the array/number directly.

Posted the proposal here for your consideration. 

Am not really interested in *lobbying* for the proposal within the context of overcoming conjecture, etc., though will to an appreciable degree if necessary. Either people here will get the usefulness of such methods relevant to math or the people here will not. The code at the linked answer already works, to it is not a "coding challenge".
guest271314 at gmail.com (2019-03-07T22:38:32.047Z)
It is simpler to have the ability to add, subtract, divide, or otherwise
manipulate individual nth indexes of an integer or decimal represented as
an array of integers potentially containing one decimal than trying to
perform the same mathematical operations on a number in JavaScript
(essentially broken in JavaScript due to the floating-point number issues).

Will re-post a use case, again, which is included at the original proposal relevant to trying to solve for the *n*th permutation, or combination, *directly* (without using loops)

    ~~(128.625*9*1.074)//1243
    ~~(128.625*9*1.144)//1324 

where if the requirement is to increment the
decimal portion of 1.074 or 1.144 if the decimal is first converted to an
array, we can use array methods to tests the matches we are looking for.
For example, 

    [1.0, 7, 4]

representation of 1.074 allows each of the portions of the number to be
adjusted independently.

If the expected result is 

     1.085

we can use bracket notation

     arr[1] = arr[1] + 1
     arr[2] = arr[2] + 1

Since we have previously defined a .toNumber()
Array method we know we can get the value of the array as a JavaScript
number.

     let n = arr.toNumber() // 1.085

If we are trying to find needles in haystacks for several million matches, for example, permutations, then manipulating arrays, for example, from 1.0 to 1.NNNNNNNNNN where each N can be represented as an index of an array provides greater flexibility and control over the manipulation of the decimal than relying on JavaScript Number or Math, or Number to String back to Number operations. 

Perhaps BigDecimal could address some of the issues, though the array approach allows individual digits manipulation for each digit of the array/number directly.

Posted the proposal here for your consideration. 

Am not really interested in *lobbying* for the proposal within the context of overcoming conjecture, etc., though will to an appreciable degree if necessary. Either people here will get the usefulness of such methods relevant to math or the people here will not. The code at the linked answer already works, to it is not a "coding challenge".
guest271314 at gmail.com (2019-03-07T22:32:47.125Z)
It is simpler to have the ability to add, subtract, divide, or otherwise
manipulate individual nth indexes of an integer or decimal represented as
an array of integers potentially containing one decimal than trying to
perform the same mathematical operations on a number in JavaScript
(essentially broken in JavaScript due to the floating-point number issues).

Will re-post a use case, again, which is included at the original proposal relevant to trying to solve for the *n*th permutation, or combination, *directly* (without using loops)

    ~~(128.625*9*1.074)//1243
    ~~(128.625*9*1.144)//1324 

where if the requirement is to increment the
decimal portion of 1.074 or 1.144 if the decimal is first converted to an
array, we can use array methods to tests the matches we are looking for.
For example, 

    [1.0, 7, 4]

representation of 1.074 allows each of the portions of the number to be
adjusted independently.

If the expected result is 

     1.085

we can use bracket notation

     arr[1] = arr[1] + 1
     arr[2] = arr[2] + 1

Since we have previously defined a .toNumber()
Array method we know we can get the value of the array as a JavaScript
number.

     let n = arr.toNumber() // 1.085

If we are trying to find needles in haystacks for several million matches, for example, permutations, then manipulating arrays, for example, from 1.0 to 1.NNNNNNNNNN where each N can be represented as an index of an array provides much more flexibility and control over the manipulation of the decimal than relying on JavaScript Number or Math operations. 

Perhaps BigDecimal could address some of the issues, though the array approach allows individual digits manipulation for each digit of the array/number directly.
guest271314 at gmail.com (2019-03-07T22:28:20.077Z)
It is simpler to have the ability to add, subtract, divide, or otherwise
manipulate individual nth indexes of an integer or decimal represented as
an array of integers potentially containing one decimal than trying to
perform the same mathematical operations on a number in JavaScript
(essentially broken in JavaScript due to the floating-point number issues).

Will re-post a use case, again, which is included at the original proposal relevant to trying to solve for the *n*th permutation, or combination, *directly* (without using loops)

    ~~(128.625*9*1.074)//1243
    ~~(128.625*9*1.144)//1324 

where if the requirement is to increment the
decimal portion of 1.074 or 1.144 if the decimal is first converted to an
array, we can use array methods to tests the matches we are looking for.
For example, 

    [1.0, 7, 4]

representation of 1.074 allows each of the portions of the number to be
adjusted independently. Since we have previously defined a .toNumber()
Array method we know we can get the value of the array as a JavaScript
number.

If the expected result is 

     1.085

we can use bracket notation

     arr[1] = arr[1] + 1
     arr[2] = arr[2] + 1
guest271314 at gmail.com (2019-03-07T22:25:51.093Z)
Have you read the proposal, and the first response to your inquiry? It is
simpler to have the ability to add, subtract, divide, or otherwise
manipulate individual nth indexes of an integer or decimal represented as
an array of integers potentially containing one decimal than trying to
perform the same mathematical operations on a number in JavaScript
(essentially broken in JavaScript due to the floating-point number issues).

Will re-post a use case, again

    ~~(128.625*9*1.074)//1243
    ~~(128.625*9*1.144)//1324 

where if the requirement is to increment the
decimal portion of 1.074 or 1.144 if the decimal is first converted to an
array, we can use array methods to tests the matches we are looking for.
For example, 

    [1.0, 7, 4]

representation of 1.074 allows each of the portions of the number to be
adjusted independently. Since we have previously defined a .toNumber()
Array method we know we can get the value of the array as a JavaScript
number.

If the expected result is 

     1.085

we can use bracket notation

     arr[1] = arr[1] + 1
     arr[2] = arr[2] + 1
guest271314 at gmail.com (2019-03-07T22:24:01.389Z)
Have you read the proposal, and the first response to your inquiry? It is
simpler to have the ability to add, subtract, divide, or otherwise
manipulate individual nth indexes of an integer or decimal represented as
an array of integers potentially containing one decimal than trying to
perform the same mathematical operations on a number in JavaScript
(essentially broken in JavaScript due to the floating-point number issues).

Will re-post a use case, again
    ~~(128.625*9*1.074)//1243
    ~~(128.625*9*1.144)//1324 

where if the requirement is to increment the
decimal portion of 1.074 or 1.144 if the decimal is first converted to an
array, we can use array methods to tests the matches we are looking for.
For example, 

    [1.0, 7, 4]

representation of 1.074 allows each of the portions of the number to be
adjusted independently. Since we have previously defined a .toNumber()
Array method we know we can get the value of the array as a JavaScript
number.