xiaoyuan Calculator
A powerful mathematical calculation tool that supports scientific calculations, equation solving, inequality solving, and provides detailed calculation steps and explanations.
Powered by 小猿 AI (Xiaoyuan AI)
Usage
Important: All inputs must use LaTeX format!
CODEBLOCK0
LaTeX Format Guide
- - Multiplication: Use
\times or \cdot, e.g., INLINECODE2 - Division: Use
\div or /, e.g., INLINECODE5 - Fraction: Use
\frac{numerator}{denominator}, e.g., INLINECODE7 - Square root: Use
\sqfrt{number}, e.g., INLINECODE9 - Power: Use
^, e.g., INLINECODE11 - Trigonometric functions:
\sin, \cos, \tan, etc. - Inequality symbols:
\geq, \leq, >, INLINECODE18 - Greek letters:
\pi, \theta, \alpha, etc. - System of equations: Use
\begin{cases}...\end{cases}, e.g.:
CODEBLOCK1
Core Features
1. Basic Operations
- - Arithmetic operations:
+, -, \times, INLINECODE26 - Power operations:
x^2, INLINECODE28 - Roots:
\sqrt{x}, INLINECODE30 - Fractions: INLINECODE31
- Percentage calculations
2. Scientific Calculations
- - Trigonometric functions:
\sin(x), \cos(x), \tan(x), \arcsin(x), \arccos(x), INLINECODE37 - Logarithms:
\log(x), \ln(x), INLINECODE40 - Exponentials:
e^x, INLINECODE42 - Others: Absolute value
|x|, factorial INLINECODE44 - Constants:
\pi, INLINECODE46
3. Equation Solving
Supports solving various algebraic equations (
no need for
solve() wrapper):
- - Linear equations: INLINECODE48
- Quadratic equations: INLINECODE49
- Higher-order equations: INLINECODE50
- System of linear equations (two variables):
\begin{cases}
x + y = 10 \\
x - y = 2
\end{cases}
- - Multi-variable systems:
CODEBLOCK3
4. Inequality Solving
Supports solving various inequalities (
no need for
solve() wrapper):
- - Single-variable inequalities: INLINECODE52
- Quadratic inequalities: INLINECODE53
- Inequality systems: INLINECODE54
5. Step-by-Step Solutions
Automatically returns detailed calculation process, for example:
CODEBLOCK4
Usage Examples
CODEBLOCK5
Features
- - Supports complete LaTeX mathematical expressions
- Automatically records and displays calculation steps
- High-precision numerical calculations
- User-friendly error messages
- Multi-language output support
Notes
- - LaTeX format input is required
- Equations and inequalities should be input directly, no
solve() wrapper needed - Trigonometric functions use radians by default
- Default variable for equation solving is INLINECODE56
- Inequality solutions are represented in interval notation
xiaoyuan 计算器
一款强大的数学计算工具,支持科学计算、方程求解、不等式求解,并提供详细的计算步骤和解释。
由小猿 AI 提供技术支持
使用方法
重要提示:所有输入必须使用 LaTeX 格式!
bash
python3 <技能路径>/scripts/calc.py [语言]
LaTeX 格式指南
- - 乘法:使用 \times 或 \cdot,例如:3 \times 4
- 除法:使用 \div 或 /,例如:8 \div 2
- 分数:使用 \frac{分子}{分母},例如:\frac{1}{2}
- 平方根:使用 \sqrt{数字},例如:\sqrt{16}
- 幂运算:使用 ^,例如:x^2
- 三角函数:\sin、\cos、\tan 等
- 不等式符号:\geq、\leq、>、<
- 希腊字母:\pi、\theta、\alpha 等
- 方程组:使用 \begin{cases}...\end{cases},例如:
\begin{cases}
x + y = 10 \\
x - y = 2
\end{cases}
核心功能
1. 基本运算
- - 算术运算:+、-、\times、\div
- 幂运算:x^2、x^3
- 开方:\sqrt{x}、\sqrt[3]{x}
- 分数:\frac{a}{b}
- 百分比计算
2. 科学计算
- - 三角函数:\sin(x)、\cos(x)、\tan(x)、\arcsin(x)、\arccos(x)、\arctan(x)
- 对数函数:\log(x)、\ln(x)、\log_{a}(b)
- 指数函数:e^x、a^b
- 其他:绝对值 |x|、阶乘 n!
- 常数:\pi、e
3. 方程求解
支持求解各类代数方程(
无需使用 solve() 包装):
- - 线性方程:2x + 5 = 15
- 二次方程:x^2 - 5x + 6 = 0
- 高次方程:x^3 - 6x^2 + 11x - 6 = 0
- 二元线性方程组:
\begin{cases}
x + y = 10 \\
x - y = 2
\end{cases}
\begin{cases}
x + y + z = 6 \\
2x - y + z = 3 \\
x + 2y - z = 2
\end{cases}
4. 不等式求解
支持求解各类不等式(
无需使用 solve() 包装):
- - 单变量不等式:2x + 5 > 15
- 二次不等式:x^2 - 4 \geq 0
- 不等式组:x + 2 > 5, x - 3 < 10
5. 分步解答
自动返回详细的计算过程,例如:
输入:x^2 - 5x + 6 = 0
步骤 1:识别为二次方程
步骤 2:使用因式分解法 (x-2)(x-3) = 0
步骤 3:求得解:x = 2 或 x = 3
结果:x = 2, x = 3
使用示例
bash
基本计算(LaTeX 格式)
python3 scripts/calc.py 2 + 3 \times 4 # 14
python3 scripts/calc.py (2 + 3) \times 4 # 20
python3 scripts/calc.py \sqrt{144} # 12
python3 scripts/calc.py 2^8 # 256
python3 scripts/calc.py \frac{10}{2} # 5
科学计算
python3 scripts/calc.py \sin(\frac{\pi}{2}) # 1.0
python3 scripts/calc.py \log(1000) # 3.0
python3 scripts/calc.py 5! # 120
方程求解(直接输入,无需 solve 包装)
python3 scripts/calc.py 2x + 5 = 15 # 线性方程:x = 5
python3 scripts/calc.py x^2 - 4 = 0 # 二次方程:x = -2, x = 2
二元线性方程组
python3 scripts/calc.py \\begin{cases} x + y = 10 \\\\ x - y = 2 \\end{cases} # x = 6, y = 4
python3 scripts/calc.py \\begin{cases} 2x + 3y = 12 \\\\ x - y = 1 \\end{cases} # x = 3, y = 2
三元线性方程组
python3 scripts/calc.py \\begin{cases} x + y + z = 6 \\\\ 2x - y + z = 3 \\\\ x + 2y - z = 2 \\end{cases}
不等式求解
python3 scripts/calc.py 2x + 5 > 15 # x > 5
python3 scripts/calc.py x^2 - 4 \geq 0 # x ≤ -2 或 x ≥ 2
指定语言
python3 scripts/calc.py 2 + 3 zh
python3 scripts/calc.py 2 + 3 en
功能特点
- - 支持完整的 LaTeX 数学表达式
- 自动记录并显示计算步骤
- 高精度数值计算
- 友好的错误提示信息
- 多语言输出支持
注意事项
- - 需要使用 LaTeX 格式输入
- 方程和不等式直接输入,无需 solve() 包装
- 三角函数默认使用弧度制
- 方程求解默认变量为 x
- 不等式解集以区间形式表示