搜索

PythonReactSEOPDF
GitHub Skill

python-calc

Evaluate arithmetic expressions precisely by calling py_calc (python-file tool).

aevatarAI☆ 11 仓库 Stars7 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

When to use

  • 用户要求精确计算(尤其是分数/长小数),例如 1/7、(1+2)*3、2**128。
  • 不允许“心算/估算/臆测”,必须可执行验证。

Procedure

  1. Call py_calc with:
    • expr: 用户的表达式(原样)
    • precision: 需要的小数精度(默认 50;如果用户要求 N 位小数,建议 precision >= N + 5)
  2. 用工具结果回答,必要时说明 precision。

Notes

  • py_calc 只允许安全 AST 子集(数字、括号、+ - * / **),不支持变量/函数调用。

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!