calc_tools_yiing681
ตัวอย่าง Python Package มาตรฐาน PEP 517/621 ที่มี 2 โมดูลการทำงาน
การใช้งาน
import calc_tools_yiing681 as pkg
# ใช้งานฟังก์ชันจาก functions
print(pkg.linear(2, 3, 1)) # 7
# ใช้งานฟังก์ชันจาก vectors
print(pkg.add_vectors((1, 2), (3, 4))) # (4, 6)
description = "A simple calculation tools package"
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
# calc_tools_yiing681
[](https://pypi.org/project/calc-seereen/)
[](https://pypi.org/project/calc-seereen/)
[](https://opensource.org/licenses/MIT)
> **calc_tools_yiing681** คือ Python Package มาตรฐาน PEP 517/621 ที่รวบรวมฟังก์ชันสำหรับการคำนวณคณิตศาสตร์พื้นฐานและพีชคณิตเวกเตอร์ (Vector Algebra) สำหรับการเรียนรู้และการใช้งานทั่วไป
---
## 📋 รายการฟังก์ชันทั้งหมดในแพ็กเกจ (Features Overview)
แพ็กเกจนี้ประกอบด้วย **2 โมดูลหลัก** รวมทั้งสิ้น **10 ฟังก์ชัน**:
### 1. โมดูล `functions` (ฟังก์ชันทางคณิตศาสตร์)
| ฟังก์ชัน | การทำงาน | สมการ / คำอธิบาย |
| :--- | :--- | :--- |
| `linear(a, b, x)` | ฟังก์ชันเส้นตรง | $f(x) = ax + b$ |
| `quadratic(a, b, c, x)` | ฟังก์ชันพหุนามกำลังสอง | $f(x) = ax^2 + bx + c$ |
| `cube(x)` | ฟังก์ชันยกกำลังสาม | $f(x) = x^3$ |
| `absolute(x)` | ค่าสัมบูรณ์ | $f(x) = \Vert{}x\Vert{}$ |
| `evaluate(fx, x)` | ประเมินค่าฟังก์ชัน | คืนค่า $fx(x)$ ที่ส่งเข้ามา |
### 2. โมดูล `vectors` (การคำนวณเวกเตอร์)
| ฟังก์ชัน | การทำงาน | คำอธิบาย |
| :--- | :--- | :--- |
| `magnitude(v)` | ขนาดเวกเตอร์ | คำนวณ $\sqrt{\sum v_i^2}$ |
| `add_vectors(v1, v2)` | การบวกเวกเตอร์ | ผลบวกตำแหน่งต่อตำแหน่ง |
| `subtract_vectors(v1, v2)` | การลบเวกเตอร์ | ผลลบตำแหน่งต่อตำแหน่ง |
| `dot_product(v1, v2)` | ผลคูณเชิงสเกลาร์ | Dot Product ($\sum v_{1i} \cdot v_{2i}$) |
| `scalar_multiply(v, k)` | คูณสเกลาร์ | คูณค่า $k$ เข้าทุกองค์ประกอบ |
---
## 💻 การติดตั้ง (Installation)
สามารถติดตั้งแพ็กเกจผ่าน `pip` ได้โดยตรง:
```bash
pip install calc-seereen
import calc_tools_yiing681 as pkg
# 1. ฟังก์ชันเส้นตรง f(x) = 2x + 3 ที่ x = 5
res_linear = pkg.linear(2, 3, 5)
print(f"Linear: {res_linear}") # Output: 13
# 2. ฟังก์ชันพหุนาม f(x) = x^2 + 2x + 1 ที่ x = 3
res_quad = pkg.quadratic(1, 2, 1, 3)
print(f"Quadratic: {res_quad}") # Output: 16
# 3. ยกกำลังสาม
print(f"Cube: {pkg.cube(4)}") # Output: 64
# 4. ค่าสัมบูรณ์
print(f"Absolute: {pkg.absolute(-12.5)}") # Output: 12.5
# 5. ประเมินค่าฟังก์ชันผ่าน evaluate
print(f"Evaluate: {pkg.evaluate(lambda x: x**2 + 5, 3)}") # Output: 14
import calc_tools_yiing681 as pkg
v1 = (3, 4)
v2 = (1, 2)
# 1. ขนาดของเวกเตอร์ (Magnitude)
print(f"Magnitude v1: {pkg.magnitude(v1)}") # Output: 5.0
# 2. การบวกเวกเตอร์ (Vector Addition)
print(f"v1 + v2: {pkg.add_vectors(v1, v2)}") # Output: (4, 6)
# 3. การลบเวกเตอร์ (Vector Subtraction)
print(f"v1 - v2: {pkg.subtract_vectors(v1, v2)}") # Output: (2, 2)
# 4. ผลคูณเชิงสเกลาร์ (Dot Product)
print(f"v1 . v2: {pkg.dot_product(v1, v2)}") # Output: 11
# 5. การคูณด้วยสเกลาร์ (Scalar Multiplication)
print(f"v1 * 3: {pkg.scalar_multiply(v1, 3)}") # Output: (9, 12)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
calc_seereen-0.0.2.tar.gz
(4.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file calc_seereen-0.0.2.tar.gz.
File metadata
- Download URL: calc_seereen-0.0.2.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30c48ce3d2fc3dbb73d9c7a9ed0f05eb64f3b528b54d7834611af979991b72d2
|
|
| MD5 |
356a86c1753a70d08aa8378ea593e619
|
|
| BLAKE2b-256 |
e5f1cda115f63364fd30eccbe37e39f2b8d74c64aed407d710383a10d1efa72d
|
File details
Details for the file calc_seereen-0.0.2-py3-none-any.whl.
File metadata
- Download URL: calc_seereen-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a1804a93f2a7b9d29547b9a352bdc0d341fc2a80df14fb38a68d75f43df6009
|
|
| MD5 |
0778743d0cb3bc05cfbddc5cb2564dbb
|
|
| BLAKE2b-256 |
f9fced6993834483b7172413ee9c360c8da4d452a24a7a7d6f2831fda282ccda
|