A Python library for handling calculations of complex number.
Project description
ComplexPy Library
ComplexPy is a Python library for storing and doing arithmetic with complex numbers.
This library allows you to perform elementary, trigonometric, logarithmic, and comparative operations with complex numbers.
Functions
- toString
- add / sum
- sub / subtract / difference
- mul / multiply / product / scale
- div / divide / quotient
- pow / exponentiate
- sqrt / square_root
- nroot / nth_root
- abs / absolute_value / mod / modulus
- conj / conjugate
- arg / argument
- ln / natural_log / natural_logarithm
- log / logarithm / general_log
- eq / equals
- le / less / less_than
- gr / greater / greater_than
- leeq / less_than_or_equals
- greq / greater_than_or_equals
- sin / sine
- cos / cosine
- tan / tangent
Usage Examples
from ComplexPy import *
number = complexNumber(3, 7)
number2 = complexNumber(8, 4)
print(number.toString()) # Will print "3 + 7 i"
print(number.add(number2).toString()) # Will print "11 + 11 i"
print(number.pow(complexNumber(3, 0)).toString()) # Will print "-414.00000000000006 - 154.0 i"
print(number.sine().toString()) # Will print "77.37850442046603 - 542.8288478055589 i"
print(number.sqrt().toString()) # Will print "2.3038850997677716 + 1.5191729832155236 i"
print(number.sqrt(1).toString()) # Will print "-2.3038850997677716 - 1.5191729832155234 i"
Installation
You can install this library by running the command below in a command prompt or powershell terminal.
pip install ComplexPy
Version history
v1.0.0
- Initial release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 complexpy-0.0.1.tar.gz.
File metadata
- Download URL: complexpy-0.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f71101c7dae21e77fe9be8409b0557543939f6de647d9610878ce8f58c449f4d
|
|
| MD5 |
c7bee061c3adfa46fbabd1f0e4533321
|
|
| BLAKE2b-256 |
244e95c7aee074ca185294d252290fcac0bdcef1b8be2bc0a18794569e89cc5b
|
File details
Details for the file ComplexPy-0.0.1-py3-none-any.whl.
File metadata
- Download URL: ComplexPy-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e392f65178818a8bbe53f9baadc7afb9bb4841787e81d8e11ea23f2c49d8be49
|
|
| MD5 |
b6359cdfde9fc4fe117b2a2207b8f9ed
|
|
| BLAKE2b-256 |
41d953b96c196ff3cb1307f5b7f53ccdf66f7442b78959f261e4150aa4f93d69
|