calculator
Run restricted local Python calculations for expressions, arbitrary precision, matrices, statistics, optimization, integration, and signal transforms; For: "calculate this expression", "verify this math result with calculator", "batch-calculate these formulas"; Triggers: calculator, math calculation, expression evaluation, formula verification, numerical computation, matrix calculation, statistics, calc
What this skill does
Calculator
When To Use
- The user wants a deterministic numeric calculation rather than a conceptual math explanation.
- The task involves expression evaluation, high-precision constants or large numbers, matrices, descriptive statistics, correlations, regressions, distribution pdf/cdf values, scalar optimization, roots, definite integrals, simple ODE samples, FFT/IFFT, or convolution.
- The user asks to verify arithmetic, formulas, generated answers, or intermediate numeric results.
Do not use for K12 tutoring, grading, curriculum-aligned explanations, or error diagnosis; those require a dedicated learning-support workflow. Do not use for open-ended mathematical modeling; keep modeling assumptions and model selection in a dedicated modeling workflow when available.
How To Call
Use the bundled script through Orkas:
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- eval "2**10 + sin(pi/4)"Choose the subcommand by computation type:
| Need | Subcommand | Example | | --- | --- | --- | | Daily arithmetic, trig, logs, powers | eval | eval "sin(pi/4) + sqrt(2)" | | Arbitrary precision, factorial, gamma, zeta | precision | precision "factorial(100)" --precision 50 | | Matrix determinant, inverse, solve, eigenvalues | matrix | matrix det --matrix "[[1,2],[3,4]]" | | Descriptive stats, correlation, regression, pdf/cdf | stats | stats describe --data "[1,2,3,4,5]" | | Scalar minimization, maximization, roots | optimize | optimize root --expr "x**3 - 2*x - 5" --bounds "[1,3]" | | Definite integrals or simple ODE samples | integrate | integrate definite --expr "sin(x)" --bounds "[0,pi]" | | FFT, IFFT, convolution | transform | transform fft --data "[1,0,1,0]" |
Core examples:
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- eval "2**10 + sin(pi/4)"
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- eval "pi" --precision 50
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- precision "factorial(1000)" --precision 50
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- matrix inverse --matrix "[[1,2],[3,4]]"
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- matrix solve --matrix "[[2,1],[1,-1]]" --matrix2 "[5,1]"
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- stats regression --data "[1,2,3]" --data2 "[2,4,6]"
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- optimize minimize --expr "x**2 + 2*x + 1" --bounds "[-10,10]"
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- integrate definite --expr "sin(x)" --bounds "[0,pi]"
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- transform convolve --data "[1,2,3]" --data2 "[4,5]"Workflow
- Translate the user's calculation request into the smallest matching subcommand.
- Run the script before reporting numeric answers when exact numeric verification matters.
- Include the expression, subcommand, and result in the response when the user may need to audit the calculation.
- For high precision, large factorials, special functions, or results sensitive to floating-point rounding, use
precisioninstead ofeval. - For expressions starting with
-, pass the value with equals syntax, such as--expr="-x**2+4", so argument parsing treats it as a value. - If the script errors because a dependency is missing, report the missing package and either compute by another reliable available method or ask before installing anything.
Output Shape
The script prints:
=== <subcommand> ===
<result>When responding to the user, keep the answer compact:
Result: ...
Check: ...For multi-step verification:
**Calculation**
- Command:
- Result:
- Interpretation:Dependencies
- Python 3.
- Basic scalar
evalcan run with Python stdlib math functions. numpyis required for matrix, statistics, transforms, and array-oriented expression behavior.mpmathis required for arbitrary precision.scipyis required for distribution functions, optimization, and integration.
Limits And Safety
- Expressions are evaluated with restricted namespaces for math functions and constants, but still treat user expressions as calculation input only.
evaluses float64-style numeric behavior unless--precisionis supplied.- Matrix and data inputs use Python literal syntax such as
[[1,2],[3,4]]or[1,2,3]. - This is not a symbolic algebra system. For proofs, derivations, or curriculum-aligned explanation, use reasoning or a dedicated learning-support workflow alongside calculator verification.
Files in this skill
- _meta.json
- scripts/calc.py
- SKILL.md
How to use in Orkas
Open the Orkas desktop app, go to the marketplace, and install this item with one click. Don't have Orkas yet? Download Orkas.
用本地 Python 脚本进行受限数学表达式、任意精度、矩阵、统计、优化、积分和信号变换计算;适合"帮我算这个表达式""用 calculator 验证数学结果""批量计算这些公式";触发词:计算器、数学计算、表达式求值、公式验证、数值计算、矩阵计算、统计计算、calculator、calc
该技能的功能
Calculator
When To Use
- The user wants a deterministic numeric calculation rather than a conceptual math explanation.
- The task involves expression evaluation, high-precision constants or large numbers, matrices, descriptive statistics, correlations, regressions, distribution pdf/cdf values, scalar optimization, roots, definite integrals, simple ODE samples, FFT/IFFT, or convolution.
- The user asks to verify arithmetic, formulas, generated answers, or intermediate numeric results.
Do not use for K12 tutoring, grading, curriculum-aligned explanations, or error diagnosis; those require a dedicated learning-support workflow. Do not use for open-ended mathematical modeling; keep modeling assumptions and model selection in a dedicated modeling workflow when available.
How To Call
Use the bundled script through Orkas:
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- eval "2**10 + sin(pi/4)"Choose the subcommand by computation type:
| Need | Subcommand | Example | | --- | --- | --- | | Daily arithmetic, trig, logs, powers | eval | eval "sin(pi/4) + sqrt(2)" | | Arbitrary precision, factorial, gamma, zeta | precision | precision "factorial(100)" --precision 50 | | Matrix determinant, inverse, solve, eigenvalues | matrix | matrix det --matrix "[[1,2],[3,4]]" | | Descriptive stats, correlation, regression, pdf/cdf | stats | stats describe --data "[1,2,3,4,5]" | | Scalar minimization, maximization, roots | optimize | optimize root --expr "x**3 - 2*x - 5" --bounds "[1,3]" | | Definite integrals or simple ODE samples | integrate | integrate definite --expr "sin(x)" --bounds "[0,pi]" | | FFT, IFFT, convolution | transform | transform fft --data "[1,0,1,0]" |
Core examples:
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- eval "2**10 + sin(pi/4)"
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- eval "pi" --precision 50
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- precision "factorial(1000)" --precision 50
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- matrix inverse --matrix "[[1,2],[3,4]]"
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- matrix solve --matrix "[[2,1],[1,-1]]" --matrix2 "[5,1]"
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- stats regression --data "[1,2,3]" --data2 "[2,4,6]"
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- optimize minimize --expr "x**2 + 2*x + 1" --bounds "[-10,10]"
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- integrate definite --expr "sin(x)" --bounds "[0,pi]"
$ORKAS_NODE $ORKAS_PC_DIR/bin/run-skill.cjs calculator calc -- transform convolve --data "[1,2,3]" --data2 "[4,5]"Workflow
- Translate the user's calculation request into the smallest matching subcommand.
- Run the script before reporting numeric answers when exact numeric verification matters.
- Include the expression, subcommand, and result in the response when the user may need to audit the calculation.
- For high precision, large factorials, special functions, or results sensitive to floating-point rounding, use
precisioninstead ofeval. - For expressions starting with
-, pass the value with equals syntax, such as--expr="-x**2+4", so argument parsing treats it as a value. - If the script errors because a dependency is missing, report the missing package and either compute by another reliable available method or ask before installing anything.
Output Shape
The script prints:
=== <subcommand> ===
<result>When responding to the user, keep the answer compact:
Result: ...
Check: ...For multi-step verification:
**Calculation**
- Command:
- Result:
- Interpretation:Dependencies
- Python 3.
- Basic scalar
evalcan run with Python stdlib math functions. numpyis required for matrix, statistics, transforms, and array-oriented expression behavior.mpmathis required for arbitrary precision.scipyis required for distribution functions, optimization, and integration.
Limits And Safety
- Expressions are evaluated with restricted namespaces for math functions and constants, but still treat user expressions as calculation input only.
evaluses float64-style numeric behavior unless--precisionis supplied.- Matrix and data inputs use Python literal syntax such as
[[1,2],[3,4]]or[1,2,3]. - This is not a symbolic algebra system. For proofs, derivations, or curriculum-aligned explanation, use reasoning or a dedicated learning-support workflow alongside calculator verification.
技能包含的文件
- _meta.json
- scripts/calc.py
- SKILL.md
如何在 Orkas 中使用
打开 Orkas 桌面应用,进入市场,一键安装此项。还没有 Orkas? 下载 Orkas.