guest271314 (2019-03-07T21:04:44.000Z)
The original motivation was trying to solve OEIS A217626 directly, that is,
without generating all of the permutations, specifically, using only a
multiple of 9 directly. See proposal at


> 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:42 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) return a[0];
>   const [
>     g, r = x => x.length == 1
>                 ? x[0]
>                 : x.length === 0
>                   ? x
>                   : x.reduce((a, b) => a + b)
>     , b = a.find(
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20190307/565d7163/attachment-0001.html>
guest271314 at gmail.com (2019-03-07T21:31:49.289Z)
The original motivation was trying to solve OEIS A217626 directly, that is,
without generating all of the permutations, specifically, using only a
multiple of 9 (TL;DR How to improve efficiency of algorithm which generates next lexicographic permutation? https://stackoverflow.com/questions/43290467/how-to-improve-efficiency-of-algorithm-which-generates-next-lexicographic-permut continued from SO user chqrlie 's answer https://stackoverflow.com/a/34238979 at Permutations without recursive function call https://stackoverflow.com/q/34013675; 9erilous 9ermutations https://codegolf.stackexchange.com/questions/175693/9erilous-9ermutations) directly (mathematically, without using any loop, and overcoming JavaScript floating-point issues). See proposal at

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 (.074; .144, respectively) can be manipulated by referencing the index of an array, then converting the array back to a number.
guest271314 at gmail.com (2019-03-07T21:29:24.080Z)
The original motivation was trying to solve OEIS A217626 directly, that is,
without generating all of the permutations, specifically, using only a
multiple of 9 (TL;DR How to improve efficiency of algorithm which generates next lexicographic permutation? https://stackoverflow.com/questions/43290467/how-to-improve-efficiency-of-algorithm-which-generates-next-lexicographic-permut continued from SO user chqrlie 's answer https://stackoverflow.com/a/34238979 at Permutations without recursive function call https://stackoverflow.com/q/34013675; 9erilous 9ermutations https://codegolf.stackexchange.com/questions/175693/9erilous-9ermutations) directly (mathematically, without using any loop, and overcoming JavaScript floating-point issues). See proposal at

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.
guest271314 at gmail.com (2019-03-07T21:28:34.453Z)
The original motivation was trying to solve OEIS A217626 directly, that is,
without generating all of the permutations, specifically, using only a
multiple of 9 (TL;DR How to improve efficiency of algorithm which generates next lexicographic permutation? https://stackoverflow.com/questions/43290467/how-to-improve-efficiency-of-algorithm-which-generates-next-lexicographic-permut continued from SO user chqrlie 's answer https://stackoverflow.com/a/34238979 at Permutations without recursive function call 9erilous 9ermutations https://codegolf.stackexchange.com/questions/175693/9erilous-9ermutations) directly (mathematically, without using any loop, and overcoming JavaScript floating-point issues). See proposal at

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.
guest271314 at gmail.com (2019-03-07T21:19:14.477Z)
The original motivation was trying to solve OEIS A217626 directly, that is,
without generating all of the permutations, specifically, using only a
multiple of 9 (TL;DR How to improve efficiency of algorithm which generates next lexicographic permutation? https://stackoverflow.com/questions/43290467/how-to-improve-efficiency-of-algorithm-which-generates-next-lexicographic-permut; 9erilous 9ermutations https://codegolf.stackexchange.com/questions/175693/9erilous-9ermutations) directly. See proposal at

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.
guest271314 at gmail.com (2019-03-07T21:15:45.929Z)
The original motivation was trying to solve OEIS A217626 directly, that is,
without generating all of the permutations, specifically, using only a
multiple of 9 (TL;DR How to improve efficiency of algorithm which generates next lexicographic permutation? https://stackoverflow.com/questions/43290467/how-to-improve-efficiency-of-algorithm-which-generates-next-lexicographic-permut) directly. See proposal at

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.
guest271314 at gmail.com (2019-03-07T21:13:35.491Z)
The original motivation was trying to solve OEIS A217626 directly, that is,
without generating all of the permutations, specifically, using only a
multiple of 9 directly. See proposal at

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.
guest271314 at gmail.com (2019-03-07T21:10:25.201Z)
The original motivation was trying to solve OEIS A217626 directly, that is,
without generating all of the permutations, specifically, using only a
multiple of 9 directly. See proposal at

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