Token导航 LogoToken导航TokenDH.com
研究检索权限需确认clawhub未标认证来源可访问clear审计提醒

mathsmaths 搜索

Agent Skill

maths 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

18,923

周安装

773

GitHub Stars

公开资料未说明

下载量

6,122
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:maths(maths 搜索)
来源仓库:https://github.com/wangyendt/maths
安装命令:
openclaw skills install maths
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install maths

简介

数论与大整数运算专用函数库集合。maths 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 支持 Karatsuba 算法加速乘法与高效因式分解。
  • 适用于密码学与高精度数字处理任务。
  • 安装命令:openclaw skills install maths。
  • 需注意大数运算时的内存与性能开销控制。

SKILL.md

name
pywayne-maths
description
Mathematical utility functions for factorization, digit counting, and large integer multiplication using Karatsuba algorithm. Use when solving number theory problems, computing factors, counting digit occurrences, or performing optimized large integer multiplication.

Pywayne Maths

Mathematical utility functions for number theory, digit analysis, and optimized integer operations.

Quick Start

from pywayne.maths import get_all_factors, digitCount, karatsuba_multiplication

# Get all factors of a number
factors = get_all_factors(28)
print(factors)  # [1, 2, 4, 7, 14, 28]

# Count digit occurrences
count = digitCount(100, 1)
print(count)  # 21 (digit 1 appears 21 times in 1-100)

# Large integer multiplication
product = karatsuba_multiplication(1234, 5678)
print(product)  # 7006652

Functions

get_all_factors

Return all factors of a positive integer.

get_all_factors(n: int) -> list

Parameters:

  • n - Positive integer to factorize

Returns:

  • List of all factors of n

Use Cases:

  • Number theory problems
  • Finding divisors
  • Simplifying fractions
  • Greatest common divisor (GCD) calculation

Example:

from pywayne.maths import get_all_factors

factors = get_all_factors(36)
print(factors)  # [1, 2, 3, 4, 6, 9, 12, 18, 36]

# Check if number is prime
n = 17
factors = get_all_factors(n)
if len(factors) == 2:  # Only 1 and itself
    print(f"{n} is prime")
else:
    print(f"{n} is not prime")

digitCount

Count occurrences of digit k from 1 to n.

digitCount(n, k) -> int

Parameters:

  • n - Positive integer, upper bound of counting range
  • k - Digit to count (0-9)

Returns:

  • Count of digit k in range [1, n]

Special Case:

  • When k = 0, counts all numbers with trailing zeros after n

Use Cases:

  • Digit frequency analysis
  • Number theory problems
  • Data analysis tasks

Example:

from pywayne.maths import digitCount

# Count digit 1 from 1 to 100
count = digitCount(100, 1)
print(count)  # 21

# Count each digit 0-9 in range 1-1000
for k in range(10):
    count = digitCount(1000, k)
    print(f"Digit {k}: {count} times")

karatsuba_multiplication

Multiply two integers using Karatsuba's divide-and-conquer algorithm.

karatsuba_multiplication(x: int, y: int) -> int

Parameters:

  • x - Integer multiplier
  • y - Integer multiplicand

Returns:

  • Product of x and y

Algorithm:

  • Karatsuba algorithm uses recursive divide-and-conquer to multiply large integers
  • Time complexity: O(n^log₂3) ≈ O(n^1.585)
  • More efficient than naive multiplication O(n²) for very large numbers

Use Cases:

  • Large integer multiplication
  • Algorithm optimization
  • Competitive programming
  • Cryptography applications

Example:

from pywayne.maths import karatsuba_multiplication

# Compare with standard multiplication
a, b = 123456789, 987654321
result = karatsuba_multiplication(a, b)
print(result)  # 121932631112635269

# Verify
assert result == a * b

Common Applications

Prime Number Detection

from pywayne.maths import get_all_factors

def is_prime(n):
    factors = get_all_factors(n)
    return len(factors) == 2 and factors == [1, n]

print(is_prime(17))   # True
print(is_prime(18))   # False

Greatest Common Divisor (GCD)

from pywayne.maths import get_all_factors

def gcd(a, b):
    factors_a = set(get_all_factors(a))
    factors_b = set(get_all_factors(b))
    common = factors_a & factors_b
    return max(common)

print(gcd(24, 36))  # 12

Digit Frequency Analysis

from pywayne.maths import digitCount

def digit_frequency(n):
    frequency = {}
    for k in range(10):
        frequency[k] = digitCount(n, k)
    return frequency

print(digit_frequency(1000))
# {0: 189, 1: 301, 2: 300, 3: 300, ...}

Large Number Calculations

from pywayne.maths import karatsuba_multiplication

# Very large numbers
x = 123456789012345678901234567890
y = 9876543210987654321098765432109876

# Use Karatsuba for efficiency
product = karatsuba_multiplication(x, y)

Notes

  • get_all_factors returns sorted unique factors
  • digitCount counts from 1 to n inclusive
  • karatsuba_multiplication is optimized for large integers (hundreds+ of digits)
  • For small integers, standard multiplication * may be faster due to overhead

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

84.92%
按下载量换算5,199

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

未展示

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills