返回顶部
c

calculator

|

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
1,117
下载量
1
收藏
概述
安装方式
版本历史

calculator

# Calculator Skill Perform accurate mathematical calculations using the `calc.py` script. ## Usage Run calculations directly with Python: ```bash python3 <skill-path>/scripts/calc.py "<expression>" ``` ## Supported Operations ### Basic Arithmetic - `+` Addition: `2 + 3` → 5 - `-` Subtraction: `10 - 4` → 6 - `*` Multiplication: `6 * 7` → 42 - `/` Division: `15 / 3` → 5 ### Powers & Roots - `^` or `**` Power: `2^10` → 1024 - `sqrt()` Square root: `sqrt(16)` → 4 ### Percentages - `100 * 15%` → 15 (15% of 100) - `50 + 50 * 10%` → 55 (add 10%) ### Trigonometry (radians) - `sin(pi/2)` → 1 - `cos(pi)` → -1 - `tan(pi/4)` → 1 ### Logarithms - `log(100)` → 2 (base 10) - `ln(e)` → 1 (natural log) ### Constants - `pi` → 3.141592653589793 - `e` → 2.718281828459045 ### Other Functions - `abs(-5)` → 5 - `round(3.7)` → 4 - `floor(3.9)` → 3 - `ceil(3.1)` → 4 - `pow(2, 8)` → 256 ## Examples ```bash python3 scripts/calc.py "2 + 3 * 4" # 14 python3 scripts/calc.py "(2 + 3) * 4" # 20 python3 scripts/calc.py "sqrt(144)" # 12 python3 scripts/calc.py "2^8" # 256 python3 scripts/calc.py "1000 * 5%" # 50 python3 scripts/calc.py "sin(0)" # 0 python3 scripts/calc.py "log(1000)" # 3 ``` ## Notes - Implicit multiplication supported: `2(3)` = `2*3` - Use parentheses for grouping - Float results are rounded to 10 decimal places to avoid precision issues

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 calculator-1776277510 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 calculator-1776277510 技能

通过命令行安装

skillhub install calculator-1776277510

下载 Zip 包

⬇ 下载 calculator v1.0.1

文件大小: 2.55 KB | 发布时间: 2026-4-16 16:01

v1.0.1 最新 2026-4-16 16:01
- Documentation improvements in SKILL.md for clarity and example coverage.
- No changes to calculator functionalities or supported operations.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部