项目作者: raviy0807
项目描述 :
The repository is completed as part of assessment for the Job Interview.
高级语言: C++
项目地址: git://github.com/raviy0807/Fibonacci-Sum-of-Even.git
Fibonacci-Sum-of-Even
Goal:
The task is to write a cpp program to calculate the sum of even fibonacci numbers using class.
Setup:
- Development Environment: Ubuntu 18.04
- IDE : Clion
- Build Tool: Cmake 3.14
- 3rd Party Library: Boost
Logic:
- Every 3rd number in the fibonacci series is even number. Based on the formula expansion. Ref1, Ref2.
- Therefore, considering the 0th number as 0 and the next even number as 2, the program calculate the even number.
- The program uses cpp_int data type of boost library to increase the limit of expansion. [Ref] (https://www.boost.org/doc/libs/1_61_0/libs/multiprecision/doc/html/boost_multiprecision/tut/ints.html)
- CMake downloads the boost library locally if it is not present in system environment.
- The program is not written for the Negative numbers.
Area of Improvement:
- Test the results with different data types like gmp_int, tom_int, etc.
- Use Boost Test for the Unit Testing of the Module.
Feel free to suggest improvement.