Commit Graph

71 Commits

Author SHA1 Message Date
Neeraj C
05aa382a16 docs: comment space fix 2020-06-16 08:05:06 +05:30
Neeraj C
12f0ec3c45 test: add two test functions 2020-06-16 08:03:14 +05:30
Neeraj C
2191ef4881 fix: whitespace issue in sum_of_digits 2020-06-15 23:26:58 +05:30
Neeraj C
d86a9b56df fix: sum of digits bug 2020-06-15 23:17:50 +05:30
Neeraj C
de4578c1a4 feat: add sum of digits 2020-06-15 22:11:20 +05:30
Omkar Langhe
026557115c
Adding algorithm to check if number is prime or not. (#834)
* Optimized algorithm to check if number is prime or not.

* logic to check if given number is prime or not.

* logic to check if given number is prime or not.

* logic to check if given number is prime or not.

* logic to check if given number is prime or not.

* Included appropriate comments as per standards.

* variable name renamed to num

* added @file and @brief in comment. Also added template and variable name changed from is_prime to result

* added @file and @brief in comment. Also added template and variable name changed from is_prime to result

* added template parameter T type in loop
2020-06-13 21:15:37 +05:30
Taj
1b5dee74c0
feat: Added a function for finding the least common multiple (#840)
* feat: Added a function for finding the least common multiple

* feat: Miller-Rabin Primality Test (probabilistic)

* Added test assertions

* Mistakenly worked on a different branch

* Doxygen comments

* Comments changed
2020-06-13 04:17:32 +05:30
Anup Kumar Panwar
846dbc005b
Merge pull request #727 from DarkWarrior703/patch-5
Create double_factorial
2020-05-23 00:46:45 +05:30
Rob Adams
51eb5beab5 fix: sqrt_double hangs on x < 1 (#760) 2020-05-20 03:05:03 +00:00
vonzo
03664deca9
Fibonacci funtion added (#767)
* finbonacci funtion added

* finbonacci funtion added

* finbonacci funtion added

* finbonacci funtion added

* Update fibonacci.cpp

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-05-19 17:50:15 +02:00
Srujan Bharadwaj
de65e2b256
Create extended_euclid_algorithm.cpp (#759)
* Create extended_euclid_algorithm.cpp

* Fix wihitespaces and fix if else space issues

* Update extended_euclid_algorithm.cpp

* updating DIRECTORY.md

* Update extended_euclid_algorithm.cpp

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-05-18 14:32:42 +02:00
John Law
264a26e15a
Fix spacing 2020-05-11 00:55:16 +02:00
John Law
8f41e1704d
Rename mod_inverse_by_fermat_theorem.cpp to modular_inverse_fermat_little_theorem.cpp 2020-05-11 00:54:45 +02:00
Mann Mehta
c9fc01af7a Resolve line length errors in math/mod_inverse_by_fermat_theorem.cpp 2020-05-09 17:33:08 +05:30
Mann Mehta
563e29acae Resolve errors in math/mod_inverse_by_fermat_theorem.cpp 2020-05-09 17:31:48 +05:30
Mann Mehta
78eecf75eb Modified the math/mod_inverse_by_fermat_theorem.cpp 2020-05-09 17:27:29 +05:30
John Law
409625656d
Fix descriptive comment 2020-05-08 22:45:38 +02:00
Mann Mehta
9872a08f27 Remove extra blank lines in math/mod_inverse_by_fermat_theorem.cpp 2020-05-09 00:26:15 +05:30
Mann Mehta
5f11e212f8 Resolve line_length errors in math/mod_inverse_by_fermat_theorem.cpp 2020-05-09 00:24:16 +05:30
Mann Mehta
c17b6a9ee0 Resolve type errors in math/mod_inverse_by_fermat_theorem.cpp 2020-05-09 00:21:24 +05:30
Mann Mehta
808464c4f6 Added mod_inverse_by_fermat_theorem.cpp in math directory. 2020-05-09 00:13:06 +05:30
Christian Clauss
c4f3f915f8
Update double_factorial.cpp 2020-04-26 08:41:22 +02:00
DarkWarrior703
2aaba721fb
Update double_factorial.cpp 2020-04-25 22:38:53 +03:00
DarkWarrior703
b403487142
Update double_factorial.cpp 2020-04-25 22:37:50 +03:00
DarkWarrior703
9fef832f57
Update double_factorial.cpp 2020-04-25 22:34:44 +03:00
DarkWarrior703
e6874e4d18
Update double_factorial.cpp 2020-04-25 22:28:20 +03:00
DarkWarrior703
a4d3475ed5
Update sqrt_double.cpp 2020-04-25 16:30:52 +03:00
DarkWarrior703
f27f3fcbf0
Update sqrt_double.cpp 2020-04-25 16:29:50 +03:00
DarkWarrior703
c8f11deea2
Update sqrt_double.cpp 2020-04-25 16:28:31 +03:00
DarkWarrior703
e9a0234cbe
Update sqrt_double.cpp 2020-04-25 16:26:36 +03:00
DarkWarrior703
d4ab125657
Update sqrt_double.cpp 2020-04-25 16:25:00 +03:00
DarkWarrior703
878dc0bf6c
Update sqrt_double.cpp 2020-04-25 16:21:45 +03:00
DarkWarrior703
e4504d641b
Rename double_factorial to double_factorial.cpp 2020-04-25 16:18:32 +03:00
DarkWarrior703
2b917ee43a
Rename sqrt_double to sqrt_double.cpp 2020-04-25 16:17:15 +03:00
DarkWarrior703
a77f0d3afe
Create double_factorial
Calculates the double factorial of an integer
2020-04-24 21:01:14 +03:00
DarkWarrior703
a23baf9db1
Create sqrt_double
Calculates the sqrt of every number in O(logn) with fixed precision.
2020-04-24 20:54:32 +03:00
John Law
30521478e7
Add Number of Positive Divisors in math
Added number_of_positive_divisors.cpp in math directory
2020-04-16 16:18:01 +02:00
nikhil kala
dbdf7f14a5
Merge pull request #695 from coleman2246/master
feat: add euclidean algorithm implementation of gcd
2020-04-16 12:05:21 +05:30
Mann Mehta
2d54bfa1e3 Modified description 2020-04-15 09:23:00 +05:30
Mann Mehta
583264da0f Resolve errors 2020-04-15 09:14:50 +05:30
Mann Mehta
30ee762347 Renamed to number_of_positive_divisors.cpp from number_of_divisors.cpp 2020-04-15 09:11:53 +05:30
Mann Mehta
4da35f1edf Modified number_of_divisors.cpp 2020-04-15 09:10:00 +05:30
Mann Mehta
6c20a62a9b Renamed file name to number_of_divisors.cpp from number-of-divisors.cpp 2020-04-15 03:13:10 +05:30
Mann Mehta
5ee32c63de Resolve typo errors 2020-04-15 03:08:49 +05:30
Mann Mehta
877125eb8a Added number-of-divisors.cpp in math directory 2020-04-15 03:00:23 +05:30
Mann Mehta
8219e124a7 Resolve typo errors 2020-04-04 18:16:40 +05:30
Mann Mehta
a82e679f2e Updated with changes in math/binary_exponent.cpp 2020-04-04 18:11:57 +05:30
Mann Mehta
1d4a67c6ea
Update math/binary_exponent.cpp
Co-Authored-By: John Law <johnlaw.po@gmail.com>
2020-04-04 17:29:11 +05:30
Mann Mehta
bcb3677f78
Update math/binary_exponent.cpp
Co-Authored-By: John Law <johnlaw.po@gmail.com>
2020-04-04 17:28:19 +05:30
Mann Mehta
085c6943a0 resolve else clause braces error 2020-04-02 04:37:16 +05:30