No description
Find a file
2022-11-09 16:54:36 +01:00
include Optimize using a deque instead of a list 2022-10-27 17:42:38 +02:00
src Optimize using a deque instead of a list 2022-10-27 17:42:38 +02:00
tests Rework cmake configuration 2022-06-05 17:38:11 +02:00
.gitignore Initial commit 2022-05-25 11:16:02 +02:00
CMakeLists.txt Fix the compilation bug for windows 2022-11-09 16:54:36 +01:00
README.md Update README.md 2022-05-30 22:46:12 +02:00

BigNumber

This project aims to be a library to make calculations with a big number (integer or float). The project can be divided in three parts:

  • The BigInt class, which represents integers numbers.
  • The BigFloat class, which represents floats numbers.
  • The big math sub-library, which contains some math functions.

Summary

Usage

  1. Download the project from GitHub
git clone https://github.com/ocineh/BigNumber.git
  1. Compile the library:
cmake -S . -B build
cmake --build build
  1. Include it in your project:
g++ -std=c++17 -o my_program.exe my_program.cpp build/libBigNumber.a

Features

  • BigInt
    • Comparison operators
      • Equalities
      • Inequalities
      • Greater than
      • Less than
      • Greater or equal
      • Less or equal
    • Arithmetic operators
      • Addition
      • Subtraction
      • Multiplication
      • Division
      • Modulo
      • Negation
      • Increment (prefix and postfix)
      • Decrement (prefix and postfix)
      • Bitwise left shift
      • Bitwise right shift
    • Arithmetic-assignment operators
      • Addition assignment
      • Subtraction assignment
      • Multiplication assignment
      • Division assignment
      • Modulo assignment
      • Bitwise left shift assignment
      • Bitwise right shift assignment
    • Assignment operators
      • Simple assignment with a BigInt
      • Simple assignment with a string
      • Simple assignment with a long long
    • I/O steam operators
      • Input stream
      • Output stream
    • Methods
      • Absolut value
      • The length of the number
      • If the number is even or odd
      • If the number is not a number
  • BigFloat
    • Comparison operators
      • Equalities
      • Inequalities
      • Greater than
      • Less than
      • Greater or equal
      • Less or equal
    • Arithmetic operators
      • Addition
      • Subtraction
      • Negation
      • Increment (prefix and postfix)
      • Decrement (prefix and postfix)
      • Bitwise left shift
      • Bitwise right shift
    • Arithmetic-assignment operators
      • Addition assignment
      • Subtraction assignment
      • Bitwise left shift assignment
      • Bitwise right shift assignment
    • Assignment operators
      • Simple assignment with a BigFloat
      • Simple assignment with a string
      • Simple assignment with a long double
    • I/O steam operators
      • Input stream
      • Output stream
    • Methods
      • Absolut value
      • The length of the number
      • If the number is not a number
      • If the number is zero
      • Ceil
      • Floor
  • big math
    • Power (Exponentiation)
    • Greatest common divisor
    • Least common multiple
    • Factorial
    • Binomial coefficient
    • Square root
    • Logarithm
    • Sine
    • Cosine
    • Tangent