quatint 0.0.3__cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,67 @@
1
+ Metadata-Version: 2.4
2
+ Name: quatint
3
+ Version: 0.0.3
4
+ Summary: A quatint class, for using quaternions backed by integers and half-integers (Hurwitz integers).
5
+ Author-email: Ryan Heard <ryanwheard@gmail.com>
6
+ License: MIT
7
+ Project-URL: Repository, https://github.com/rheard/quatint
8
+ Keywords: complex,math
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Programming Language :: Python :: Implementation :: CPython
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: sympy<=1.12.1
21
+ Dynamic: license
22
+ Dynamic: license-file
23
+
24
+ This package provides a `hurwitzint` class for dealing with Hurwitz integers.
25
+
26
+ Float operations are avoided by this package for infinite precision. To input half-integers with infinite precision,
27
+ use the `half` argument as so:
28
+
29
+ ```python
30
+ from quatint import hurwitzint
31
+
32
+ a = hurwitzint(3, 5, 7, 11)
33
+
34
+ print(a) # Outputs "3+5i+7j+11k"
35
+ ```
36
+
37
+ ## Examples
38
+
39
+ ```python
40
+ from quatint import hurwitzint
41
+
42
+ a = hurwitzint(1, 2, 3, 4)
43
+ b = hurwitzint(2, 3, 4, 5)
44
+
45
+ c = a * b
46
+ print(c) # Outputs "-36+6i+12j+12k"
47
+ ```
48
+
49
+ ## Disclaimer
50
+
51
+ This is intended for use with discrete mathematics, and ideally will be limited to the
52
+ operations: add, sub, mul, and pow.
53
+
54
+ Trying to divide using this class, or using floats with this class, will (probably) result in integer conversion cutoff.
55
+
56
+ As an example of this problem, note the equivalences below:
57
+ ```python
58
+ from quatint import hurwitzint
59
+
60
+ a = hurwitzint(1, 2, 3, 4)
61
+
62
+ print(a / 3) # Outputs "i+j+k"
63
+ print(a / 3.5) # Outputs "i+j+k"
64
+
65
+ print(a + 1) # Outputs "2+2i+3j+4k"
66
+ print(a + 1.5) # Outputs "2+2i+3j+4k"
67
+ ```
@@ -0,0 +1,10 @@
1
+ 3a49525171c7d4218706__mypyc.cpython-314-aarch64-linux-gnu.so,sha256=ZfxIZNjTaff0KOTTI5975yrHrbUAfU2BwzujE0XcRaI,746432
2
+ quatint/__init__.cpython-314-aarch64-linux-gnu.so,sha256=wyn-5jFBjcnRto9K9pDHBC408b63edHPaONabpiZ-Kk,203120
3
+ quatint/quat.cpython-314-aarch64-linux-gnu.so,sha256=q_sWJBdBvk7rws9U8TwJey89yRRi2QfCXluU2alERlU,203120
4
+ quatint-stubs/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ quatint-stubs/quat.pyi,sha256=xDCNrikfg9-c4RWHE2zwVwgD4fXtAQrjCLW-s7d-RX4,2882
6
+ quatint-0.0.3.dist-info/METADATA,sha256=1een1HxdAiQcFC27BtUFtRhFcI3Ix8ZeLYRw8TabJWw,1924
7
+ quatint-0.0.3.dist-info/WHEEL,sha256=W3yQaRspqLo-Xj5F8xZxSITSiTlwA5vUIq_6JkWB33c,193
8
+ quatint-0.0.3.dist-info/top_level.txt,sha256=5Ii4PDUZslezIEwK0uNjzWWkUXsBRi96NKCuuYLNDGA,50
9
+ quatint-0.0.3.dist-info/RECORD,,
10
+ quatint-0.0.3.dist-info/licenses/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
@@ -0,0 +1,7 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp314-cp314-manylinux_2_17_aarch64
5
+ Tag: cp314-cp314-manylinux2014_aarch64
6
+ Tag: cp314-cp314-manylinux_2_28_aarch64
7
+
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2018 The Python Packaging Authority
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ 3a49525171c7d4218706__mypyc
2
+ quatint
3
+ quatint-stubs
File without changes
quatint-stubs/quat.pyi ADDED
@@ -0,0 +1,66 @@
1
+ from _typeshed import Incomplete
2
+ from dataclasses import dataclass
3
+ from typing import Iterator
4
+
5
+ OTHER_OP_TYPES = int | float
6
+ OP_TYPES: Incomplete
7
+
8
+ @dataclass(frozen=True)
9
+ class HurwitzFactorization:
10
+ content: int
11
+ unit: hurwitzint
12
+ primes: tuple['hurwitzint', ...]
13
+
14
+ def mod_sqrt_prime(n: int, p: int) -> int | None: ...
15
+
16
+ class hurwitzint:
17
+ a: int
18
+ b: int
19
+ c: int
20
+ d: int
21
+ def __init__(self, a: int = 0, b: int = 0, c: int = 0, d: int = 0, *, half: bool = False) -> None: ...
22
+ @property
23
+ def is_lipschitz(self) -> bool: ...
24
+ @property
25
+ def den(self) -> int: ...
26
+ def conjugate(self) -> hurwitzint: ...
27
+ def components2(self) -> tuple[int, int, int, int]: ...
28
+ def __add__(self, other: OP_TYPES) -> hurwitzint: ...
29
+ def __radd__(self, other: OTHER_OP_TYPES) -> hurwitzint: ...
30
+ def __sub__(self, other: OP_TYPES) -> hurwitzint: ...
31
+ def __rsub__(self, other: OTHER_OP_TYPES) -> hurwitzint: ...
32
+ def __neg__(self) -> hurwitzint: ...
33
+ def __pos__(self) -> hurwitzint: ...
34
+ def __mul__(self, other: OP_TYPES) -> hurwitzint: ...
35
+ def __rmul__(self, other: OTHER_OP_TYPES) -> hurwitzint: ...
36
+ def __pow__(self, exp: int) -> hurwitzint: ...
37
+ def __divmod__(self, other: OP_TYPES) -> tuple['hurwitzint', 'hurwitzint']: ...
38
+ def __truediv__(self, other: OP_TYPES) -> hurwitzint: ...
39
+ def __rtruediv__(self, other: OTHER_OP_TYPES) -> hurwitzint: ...
40
+ def __floordiv__(self, other: OP_TYPES) -> hurwitzint: ...
41
+ def __rfloordiv__(self, other: OTHER_OP_TYPES) -> hurwitzint: ...
42
+ def __mod__(self, other: OP_TYPES) -> hurwitzint: ...
43
+ def rdivmod(self, other: OP_TYPES) -> tuple['hurwitzint', 'hurwitzint']: ...
44
+ def rtruediv(self, other: OP_TYPES) -> hurwitzint: ...
45
+ def rfloordiv(self, other: OP_TYPES) -> hurwitzint: ...
46
+ def rmod(self, other: OP_TYPES) -> hurwitzint: ...
47
+ def __abs__(self) -> int: ...
48
+ def __bool__(self) -> bool: ...
49
+ def __iter__(self) -> Iterator[int]: ...
50
+ def __len__(self) -> int: ...
51
+ def __getitem__(self, idx: int) -> int: ...
52
+ def __eq__(self, other: object) -> bool: ...
53
+ def __hash__(self) -> int: ...
54
+ def gcd_right(self, other: OP_TYPES, *, normalize: bool = True) -> hurwitzint: ...
55
+ def gcd_left(self, other: OP_TYPES, *, normalize: bool = True) -> hurwitzint: ...
56
+ @staticmethod
57
+ def units() -> tuple['hurwitzint', ...]: ...
58
+ def content(self) -> int: ...
59
+ def factor_right(self) -> HurwitzFactorization: ...
60
+ def factor_left(self) -> HurwitzFactorization: ...
61
+
62
+ def rdivmod(a: hurwitzint, b: OP_TYPES) -> tuple['hurwitzint', 'hurwitzint']: ...
63
+ def gcd_left(a: hurwitzint, b: OP_TYPES) -> hurwitzint: ...
64
+ def gcd_right(a: hurwitzint, b: OP_TYPES) -> hurwitzint: ...
65
+ def prod_right(x: Iterator[OP_TYPES], unit: hurwitzint | None = None): ...
66
+ def prod_left(x: Iterator[OP_TYPES], unit: hurwitzint | None = None): ...