Skip to content

My biginteger realization with Boost library tests. Just lab for my university

Notifications You must be signed in to change notification settings

definability/bigint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BigInt

My biginteger realization with Boost library tests. Just a lab for my university

  • Boolean arithmetic
  • Basic arithmetic
  • Class with overloaded operators
  • Modular arithmetic
  • Boost Test Library
  • GCD (Euclid + Binary)
  • LCM
  • Interface (read/write)

How to make

make all

command compiles it depending on your system architecture (64-bit or 32-bit). Executable is ./bin/bigint.

How to run

Only testing at the moment.

How to test

To see available tests type

make available_tests

To test one of them just type

make test_testname

To see only errors (or nothing if there are no errors) type

make test_testname_errors

Time tests

make test_time
./tests/bin/time 1 1000

Usage of time:

  • If you execute time without parameters, you can see available test numbers
  • First argument is the test number
  • Second argument is the number of BigIntegers to generate and operate
  • Third argument is timeout in seconds (positive integer). Default is 10

Memory leaks testing

Use valgrind. For example:

valgrind --track-origins=yes --tool=memcheck --leak-check=full ./tests/bin/time 5 1 2>err.log

Flag -g in g++ allows you to see the line of code in which the memory leak could be fixed.

About

My biginteger realization with Boost library tests. Just lab for my university

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published