Manual #

How to calculate? (a✕b)2

2 * 3
|----
|
6 ^ 2
|
36
2 * 3 * 4
|----
|
6 ^ 2
|
36    * 4
|--------
|
144 ^ 2
|
20736
2 * 3 * 4 * 5
|----
|
6 ^ 2
|
36    * 4
|--------
|
144 ^ 2
|
20736     * 5
|------------
|
103680 ^ 2
|
10749542400

First 9 digits are showing by default

616,075,336 3776638803808256

123456789

Append one #️⃣ for resize

616,075,336,377,663 8803808256

123456789 #️⃣ 15

Another #️⃣ to offset

616 075,336,377,663,880 3808256

123456789 #️⃣ 15 #️⃣ 3

Misc.

  • 0s replaced to 1, e.g.:
    • 2 *  0 * 3 same as 2 * 1 * 3
    • 2 * 00 * 3 same as 2 * 1 * 3
API #
import { config } from 'accdoo';
// const { config } = await import('https://esm.sh/accdoo');

const parse = config({
    max_size: 1000,
    default_size: 9,
});

const arr = [ '123', '456', '789' ];

// 616075336
parse(arr);

// 616075336377663
parse(arr, { size: 15 });

// 616075336377664
parse(arr, { size: 15, round: true });

// 075336377663880
parse(arr, { size: 15, offset: 3 });
License: the MIT
CLI #

Node.js C++ V8

npx -y accdoo   123 456 789 "#15 #3"

Deno (recommended) Rust V8

is secure by default.
Unless you specifically enable it, a program run with Deno has no file, network, or environment access.

deno run npm:accdoo   123 456 789 "#15 #3"

Bun Zig JSC

is a fast JavaScript runtime designed as a drop-in replacement for Node.js.
It's powered by JavaScriptCore under the hood, dramatically reducing startup times and memory usage.

bun x accdoo   123 456 789 "#15 #3"

QuickJS C

is a small and embeddable JavaScript engine.
Fast interpreter with very low startup time, can compile JavaScript sources to executables with no external dependency.

mkdir demo
cd    demo

npm init --yes
npm install --save accdoo

qjs ./node_modules/accdoo/dist/cli/q.js   123 456 789 "#15 #3"
Releases #
built date
2024-02-14T10:23:37.207Z
npm ver.
0.0.6
git rev.
200a6247a1600fa696
checksum
(SHA256)
403b8ae0124497827d010f6ec4997649fbf2e53eaa8ca46dfa8334276f3601a0