adnus
Description
adnus (AdNuS): Advanced Number Systems.
adnus is a Python library that provides an implementation of various advanced number systems. This library is designed for mathematicians, researchers, and developers who need to work with number systems beyond the standard real and complex numbers.
Features
- Harmonic and Oresme Sequences: Functions to generate harmonic numbers and Oresme sequences.
- Bicomplex Numbers: A class for bicomplex numbers with full arithmetic support.
- Neutrosophic Numbers: Classes for neutrosophic numbers, including their complex and bicomplex extensions.
- Hyperreal Numbers: A conceptual implementation of hyperreal numbers.
- Extensible Design: Built with an abstract base class to easily extend and add new number systems.
- Fully Typed: The library is fully type-hinted for better code quality and maintainability.
- Real numbers
- Complex numbers
- Quaternion numbers
- Octonion numbers
- Sedenion numbers
- Pathion numbers
- Chingon numbers
- Routon numbers
- Voudon numbers
Installation
To install the library, clone the repository and use Poetry:
git clone https://github.com/WhiteSymmetry/adnus.git cd adnus poetry install
Kullanım (Türkçe) / Usage (English)
Here's a quick overview of how to use the different number systems available in adnus.
Bicomplex Numbers
import adnus as ad
#from adnus import BicomplexNumber
z1 = ad.BicomplexNumber(1 + 2j, 3 + 4j)
z2 = ad.BicomplexNumber(5 + 6j, 7 + 8j)
print(f"Addition: {z1 + z2}")
print(f"Multiplication: {z1 * z2}")
Neutrosophic Numbers
import adnus as ad
# from adnus import NeutrosophicNumber
n1 = ad.NeutrosophicNumber(1.5, 2.5)
n2 = ad. NeutrosophicNumber(3.0, 4.0)
print(f"Addition: {n1 + n2}")
print(f"Multiplication: {n1 * n2}")
import adnus as ad # Complex(0, 0) bir HypercomplexNumber örneği döndürür ComplexClass = type(ad.Complex(0, 0)) C = ad.cayley_dickson_process(ComplexClass) print(C(3-7j))
import adnus as ad
q1 = ad.Quaternion(1, 2, 3, 4)
q2 = ad.Quaternion(5, 6, 7, 8)
print(f"Quaternions: {q1} * {q2} = {q1 * q2}")
Running Tests
To ensure everything is working correctly, you can run the included tests using pytest:
poetry run pytest
Kurulum (Türkçe) / Installation (English) Python ile Kurulum / Install with pip, conda, mamba
pip install adnus -U python -m pip install -U adnus conda install bilgi::adnus -y mamba install bilgi::adnus -y
- pip uninstall adnus -y
- pip install -U adnus
- python -m pip install -U adnus
Github Master Kurulumu / GitHub Master Installation
Terminal:
pip install git+https://github.com/WhiteSymmetry/adnus.git
Jupyter Lab, Notebook, Visual Studio Code:
!pip install git+https://github.com/WhiteSymmetry/adnus.git
or
%pip install git+https://github.com/WhiteSymmetry/adnus.git
pixi init adnus
cd adnus
pixi workspace channel add https://repo.prefix.dev/bilgi --prepend
✔ Added https://repo.prefix.dev/bilgi
pixi add adnus
✔ Added adnus >=0.2.0,<2
pixi install
pixi shell
pixi run python -c "import adnus; print(adnus.version)"
pixi remove adnus
conda install -c https://prefix.dev/bilgi adnus
pixi run python -c "import adnus; print(adnus.version)"
pixi run pip list | grep adnus
pixi run pip show adnus
Name: adnus
Version: 0.2.0
Summary: A Python library for Advanced Number Systems (AdNuS), including Bicomplex, Neutrosophic, Hyperreal numbers, reals, Complex, Quaternion, Octonion, Sedenion, Pathion, Chingon, Routon, Voudon.
Home-page: https://github.com/WhiteSymmetry/adnus
Author: Mehmet Keçeci
Author-email: Mehmet Keçeci <...>
License: GNU AFFERO GENERAL PUBLIC LICENSE
Copyright (c) 2025-2026 Mehmet Keçeci
Files
Files
(217.4 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:36e4b9dcc979449461dc6d2ae8383a2a
|
42.0 kB | Download |
|
md5:f35797028868908655727f62ec19e1ea
|
91.8 kB | Download |
|
md5:c39984c420f649989e2f41efb5d618f0
|
83.6 kB | Download |
Additional details
Software
- Repository URL
- https://github.com/WhiteSymmetry/adnus
- Programming language
- Python
- Development Status
- Active