Files
C-Plus-Plus/math
Stressed a0227012ec feat: add Quadratic equations complex numbers (#2451)
* Added quadratic_equations_complex_numbers.cpp

* Added a demonstration

* Added test cases

* Added test cases

* Revert "Added test cases"

This reverts commit a1433a9318.

* Added test cases and made docs /// instead of //

* test: Added test cases for quadraticEquation
docs: Changed comment style

* test: more test cases
docs: added documentation

* docs: Updated description

* chore: removed redundant returns

* chore: fixed formatting to pass Code Formatter checks

* chore: apply suggestions from code review

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* test: Added exception test

* Update math/quadratic_equations_complex_numbers.cpp

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

* Update math/quadratic_equations_complex_numbers.cpp

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

* Update math/quadratic_equations_complex_numbers.cpp

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

---------

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
2023-04-28 13:53:19 -06:00
..
2020-06-22 16:21:57 -04:00
2020-11-25 04:18:50 -05:00
2020-11-22 23:05:01 +05:30
2020-10-27 06:33:29 +05:30
2022-02-02 11:02:02 +05:30
2020-06-23 15:13:28 -05:00
2021-10-26 13:19:58 +05:30

Prime factorization

Prime Factorization is a very important and useful technique to factorize any number into its prime factors. It has various applications in the field of number theory.

The method of prime factorization involves two function calls. First: Calculating all the prime number up till a certain range using the standard Sieve of Eratosthenes.

Second: Using the prime numbers to reduce the the given number and thus find all its prime factors.

The complexity of the solution involves approx. O(n logn) in calculating sieve of eratosthenes O(log n) in calculating the prime factors of the number. So in total approx. O(n logn).

Requirements: For compile you need the compiler flag for C++ 11