────────────
INSTRUCTIONS
────────────

The calculator operates on the NUMBER IN MEMORY.
Use "Start Generation" or "Verify number from File" to load a number first.

FIELD: "Use the value of"
  Default value: 2
  Enter any number (up to 10,000 digits) to use as operand.
  Buttons 1 and 2 set the operand instantly with one click.

AUTO UNDO (checkbox)
  When active: each operation shows the result but restores
  the original number in memory automatically.
  When inactive: each operation permanently changes the number in memory.

UNDO LAST CALCULATION (button)
  Restores the previous number regardless of Auto Undo state.

CURRENT DIGIT COUNT
  Shows the number of digits of the number currently in memory.
  Updated automatically after each operation.

────────────────────────────────────
ARITHMETIC OPERATIONS
────────────────────────────────────
ADD        Adds the operand to the number in memory.
SUBTRACT   Subtracts the operand from the number in memory.
MULTIPLY   Multiplies the number in memory by the operand.
DIVIDE     Divides the number in memory by the operand (integer division).
MOD        Returns the remainder of the division by the operand.
+UI        Fast addition using the operand as a small integer.

────────────────────────────────────
POWER AND ROOTS
────────────────────────────────────
POWER      Raises the number in memory to the power of the operand.
           Warning shown if result exceeds 10,000,000 digits.
           Operand is automatically reduced to 100 if larger.
ROOT       Calculates the N-th root (N = operand, minimum 2).
           Operand is reduced to 1000 if larger.
           Operand is reduced to number of digits if too large.
           Shows "(exact!)" if the root is mathematically exact.

────────────────────────────────────
SHIFT OPERATIONS
────────────────────────────────────
SHIFT LEFT   Multiplies by 2^N (N = operand). Equivalent to N left bit shifts.
SHIFT RIGHT  Divides by 2^N (N = operand). Equivalent to N right bit shifts.
X 10         Appends a zero to the right (multiplies by 10). Instantaneous.
/ 10         Removes the last digit (divides by 10). Instantaneous.

────────────────────────────────────
NUMBER THEORY
────────────────────────────────────
GCD        Greatest Common Divisor between the number in memory
           and the operand. Same as GCF (Greatest Common Factor).
GCF M      Greatest Common Divisor between the number in memory
           and the number stored in calculator memory (M button).
           Calculator memory must be loaded first using the M button.
LCM        Least Common Multiple between the number in memory
           and the operand.
           Warning shown if result exceeds system limits.

────────────────────────────────────
STRING OPERATIONS (instantaneous)
────────────────────────────────────
REVERSE    Reverses all digits of the number. Example: 12345 -> 54321.
CONCAT     Appends the operand digits to the right of the number in memory.
           Example: number=1234, operand=5678 -> result=12345678.

────────────────────────────────────
PRIME OPERATIONS
────────────────────────────────────
PREVP      Finds the previous prime number before the number in memory.
           Warning shown for numbers with more than 10,000 digits.
NEXTP      Finds the next prime number after the number in memory.
           Warning shown for numbers with more than 10,000 digits.

────────────────────────────────────
ANALYSIS
────────────────────────────────────
IS P?      Quick primality test on the number currently in memory.
           Uses GCD pre-filter followed by probabilistic prime test.
           Result: "IT COULD BE A PRIME" or "NOT PRIME".

FACT       Prime factorization of the number in memory.
           Works for numbers up to approximately 30 digits.
           Returns all prime factors. Example: 48 -> 2 2 2 2 3
           For numbers with large prime factors (20+ digits),
           returns the smaller factors found plus the remaining large factor.

ANALYZE    Analyzes the positions of each digit in the number in memory.
           You can analyze a specific digit (0-9) or ALL digits at once.
           Shows total occurrences, percentage, and first/last N positions.
           Works instantly even for numbers with 45 million digits!
           Example output:
             Digit 7 - Total: 4526194 of 45257307 (10.0010%)
             First 50: 3 6 18 31 32 43 65 91 ...
             Last  50: 449 438 422 417 405 ...

────────────────────────────────────
CALCULATOR MEMORY (M / RM / C)
────────────────────────────────────
M          Stores the current number in memory for later use in
           GCF M operations or for temporary storage.
           The number remains stored until C is pressed or
           a new M is stored.

RM         Retrieves the number stored in M back to active memory.
           The previous active number is saved for Undo.

C          Clears the calculator memory (sets M to zero).

────────────────────────────────────
SAVE AND VIEW
────────────────────────────────────
IS P?      See ANALYSIS section above.
SAVE NUMBER  Saves the current number in memory to a TXT file.
VIEW         Displays the complete number (up to 10,000 digits only).
             For larger numbers use Save NUMBER and open with Notepad.
PASTE      Pastes a number from the clipboard into memory.
CLEAR      Clears the number from memory.
COPY       Copies the current number in memory to the clipboard.

────────────────────────────────────
NOTES
────────────────────────────────────
* All operations work with numbers of arbitrary size (BigInt).
* Maximum supported size: 78,000,000 digits.
* Operations on very large numbers may take several seconds.
* The operand field accepts numbers up to 10,000 digits.
* Division always returns the integer part (floor division).
* Auto Undo is active by default — disable it to accumulate operations.
* For prime testing on large numbers, use "Verify number from File"
  with PFGW for faster and more reliable results.
* The Analyze function uses optimized ASM code and runs in under
  1 second even for numbers with 45 million digits.
