Create Complex Numbers Utils
- [X] I have read CONTRIBUTING.md.
- [X] This pull request is all my own work -- I have not plagiarized it.
- [X] All filenames are in PascalCase.
- [X] All functions and variable names follow Java naming conventions.
- [X] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
- [X] All new code is formatted with
clang-format -i --style=file path/to/your/file.java
Overview
This contribution introduces algorithms for performing arithmetic and trigonometric operations on complex numbers.
Key Features of the Code
- Basic Arithmetic Operations: Includes methods to add, subtract, multiply, divide, power, and to use logarithm on complex numbers.
- Trigonometric Functions : Encompasses a full set of trigonometric operations adapted for complex numbers, such as sine, cosine, tangent, cotangent, arcsine, arccosine, arctangent, and arccotangent.
- Exception Handling : Incorporates error handling to manage undefined operations, such as division by zero or logarithm of zero.
- Comprehensive Test Suite: Accompanied by a detailed test suite which verifies the functionality and accuracy of all operations.
Codecov Report
Attention: Patch coverage is 90.56604% with 5 lines in your changes are missing coverage. Please review.
Project coverage is 37.52%. Comparing base (
ede3e46) to head (799ba61).
| Files | Patch % | Lines |
|---|---|---|
| ...ava/com/thealgorithms/maths/ComplexNumberUtil.java | 90.56% | 1 Missing and 4 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #5128 +/- ##
============================================
+ Coverage 37.36% 37.52% +0.15%
- Complexity 2350 2374 +24
============================================
Files 517 518 +1
Lines 15618 15671 +53
Branches 2971 2976 +5
============================================
+ Hits 5836 5880 +44
- Misses 9495 9498 +3
- Partials 287 293 +6
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution!
Please reopen this pull request once you have made the required changes. If you need help, feel free to ask in our Discord server or ping one of the maintainers here. Thank you for your contribution!