Metadata-Version: 2.4
Name: math_multipromt
Version: 0.1.4
Summary: Моя математическая библиотека
Author: Juri Tee
Requires-Python: >=3.8
Description-Content-Type: text/markdown

\# math\_multipromt



A custom mathematical Python library for high-precision arithmetic, geometric operations, trigonometric calculations, and angular unit conversions.



> \*\*Warning!\*\* 

> This module uses a custom `Float64` class (64-bit structure with a 40-bit exponent and a 23-bit mantissa). It is not fully compatible with standard Python `float` or third-party libraries (e.g., NumPy). Use `Float64(val)` explicitly or convert back using `float(val)` / `int(val)`.



\---



\## 🚀 Main Features



\### 1. Custom Data Types

\* \*\*`Float64`\*\*: Custom 64-bit float representation supporting arithmetic operators, powers, and bitwise parsing.

\* \*\*`ComplexFloat64`\*\*: Complex numbers based on `Float64`.

\* \*\*`Point`\*\*, \*\*`Vector`\*\*, \*\*`Matrix`\*\*: Basic 2D linear algebra and geometric primitives.



\---



\### 2. Angular Unit Conversions

The library provides built-in helper functions to convert angles between \*\*Radians\*\*, \*\*Degrees\*\*, and \*\*Rotations (Turns)\*\*:



| Function | Description |

| :--- | :--- |

| `rad\_to\_rot(radians)` | Converts radians to rotations (turns) |

| `rad\_to\_deg(radians)` | Converts radians to degrees |

| `rot\_to\_rad(rotations)` | Converts rotations to radians |

| `rot\_to\_deg(rotations)` | Converts rotations to degrees |

| `deg\_to\_rot(degrees)` | Converts degrees to rotations |

| `deg\_to\_rad(degrees)` | Converts degrees to radians |



\---



\### 3. Interpolation Functions

\* `mix(v1, v2, t)`: Linear interpolation (Lerp).

\* `mix\_quadratic(v1, v2, t)`: Quadratic interpolation (Ease-In).

\* `mix\_sinusoidal(v1, v2, t)`: Sinusoidal interpolation (Ease-In-Out).



\---



\## 💻 Quick Usage Example



```python

from math\_promt.math\_promt import (

&#x20;   Float64, Point, Vector, sin, pi,

&#x20;   deg\_to\_rad, rad\_to\_deg, mix

)



\# Angular conversion

rad = deg\_to\_rad(180)

print("180 degrees in radians:", rad)  # \~3.14159



\# Trigonometry

print("sin(pi/2):", sin(pi / 2))



\# Geometry

p = Point(1, 1)

v = Vector(2, 3)

print("Point + Vector:", p + v)



\# Interpolation

print("Linear Mix:", mix(0, 100, 0.5))

&#x20;```

