Priotizaer: Prime Factorization-er

Last modified on
Output
Priotizaer


How to Use

  • Type the input (positive integer) then hit 🏃‍♂️‍➡️ Run button or press Enter/Return on keyboard.
  • Minimum input value is 1, and maximum of 9,007,199,254,740,991.
  • Modify the input value to clear the result.
  • To abort a certain computation, simply modify the input, delete a number or add another number.

Output

  • Priotizaer will show the prime factorisation and factor multiplication list of the input number (if the input can be factorised).
  • If the input is a prime number, Priotizaer will return the Prime word.
  • For non-integer or negative number or value beyond limit, Priotizaer will show error message.
  • Priotizaer will also show the time spent for the process to finish (in milliseconds) at the bottom of the output.
  • We can copy the prime factorisation or a factor multiplication row by clicking/tapping it.

The Limit

  1. Because of the iterative ♻️ technique.

    This actually has already been solved 🥳

    Priotizaer is updated to:
    • Implement the Web Worker API.
    • Run on the latest cleaned flow and logic.

    Therefore, it should go smoother than its initial version ✅

  2. JavaScript limitation Number.MAX_SAFE_INTEGER = 9,007,199,254,740,991 (64‐bit IEEE 754 standard).

    9,007,199,254,740,991 is nine quadrillion, seven trillion, one hundred and ninety-nine billion, two hundred and fifty-four million, seven hundred and forty thousand, nine hundred and ninety-one, thank you.


✅ Checkmark UNICODE Regular Expression on Blogger

This part is quite a quirk on Blogger. I suppose it's from CodeMirror normalisation method (for rendering consistency). Blogger uses CodeMirror for their text editor.

Thus, here is a snippet to properly match this character ✅ on Blogger:

//  - "✅" (U+2705)
//  - "☑" (U+2611)
//  - "✓" (U+2713)
//  - "✔" (U+2714)
//  - plus an optional variation selector (U+FE0F)

/(?:\u2705|\u2611|\u2713|\u2714)\uFE0F?/

We can use the u (unicode) flag for that, optionally:

/(?:\u2705|\u2611|\u2713|\u2714)\uFE0F?/u
Priotizaer: Prime Factorization-er

GCF and LCM

To find out about finding Greatest Common Factor (GCF) and Least Common Multiple (LCM) using continuous division technique, please try this post on Monkey Raptor — I also provide a JavaScript snippet for the process in the post.