Back to list
zly7

bignum-calculator

by zly7

管道大模型

0🍴 0📅 Jan 22, 2026

SKILL.md


name: bignum-calculator description: Arbitrary precision integer calculator for handling extremely large numbers. Use when users need to compute with numbers that exceed standard numeric limits, including operations like factorial of large numbers (e.g., 100!), powers with large exponents (e.g., 2^1000), arithmetic on numbers with hundreds of digits, or prime checking, GCD, LCM, Fibonacci, and binomial coefficients.

Big Number Calculator

Perform arbitrary precision integer arithmetic using Python's native big integer support.

Quick Start

Run the calculator script:

python scripts/bignum_calc.py <operation> <args...>

Supported Operations

OperationArgsExampleDescription
adda badd 999999999999999999 1Addition
suba bsub 1000000000000 1Subtraction
mula bmul 123456789 987654321Multiplication
diva bdiv 1000000000000 7Integer division
moda bmod 1000000000007 1000000007Modulo
powbase exppow 2 1000Power (2^1000)
factnfact 100Factorial (100!)
gcda bgcd 123456789 987654321Greatest common divisor
lcma blcm 12345 67890Least common multiple
primenprime 104729Check if prime
digitsndigits 12345678901234567890Count digits
digitsumndigitsum 12345678901234567890Sum of digits
fibnfib 1000n-th Fibonacci number
binomialn kbinomial 100 50Binomial coefficient C(n,k)

Examples

# Calculate 2^1000
python scripts/bignum_calc.py pow 2 1000

# Calculate 100!
python scripts/bignum_calc.py fact 100

# Calculate 1000th Fibonacci number
python scripts/bignum_calc.py fib 1000

# Check if a large number is prime
python scripts/bignum_calc.py prime 104729

# Calculate C(100, 50)
python scripts/bignum_calc.py binomial 100 50

Direct Python Usage

For complex calculations, use Python directly:

# Large factorial
import math
result = math.factorial(1000)
print(f"1000! has {len(str(result))} digits")

# Large power
result = 2 ** 10000
print(f"2^10000 has {len(str(result))} digits")

# Modular exponentiation (efficient)
result = pow(2, 1000000, 10**9 + 7)

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon