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())
print(number.add(number2).toString())
print(number.pow(complexNumber(3, 0)).toString())
print(number.sine().toString())
print(number.sqrt().toString())
print(number.sqrt(1).toString())
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.