Skip to content

My bigint implementation with shortcut functionality. Also implemented a class for finding the root of a polynomial, which shows the correct work with "bignum" numbers

Notifications You must be signed in to change notification settings

RakhimovEmil/bignum_and_polynomial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mp::bignum

Long non-negative integer non-template class. Such a number is analogous to unsigned int, but it can have an unlimited number of digits in advance.

The class has the following list of operations:

  • explicit construction from a decimal string (std :: string).
  • copying
  • explicit conversions to an integer (uint32_t). If the number does not fit in uint32_t, the value is narrowed (like int -> short)
  • the ability to use in conditional expressions
  • the class should not allow subtraction
  • function to get the decimal string representation to_string
  • input/output to standard streams
  • operations +, *, +=, *=

mp::polynomial

Implements polynomial abstraction

equation

The class has the following list of operations:

  • explicit constructor from the format string: 5*x^3+2*x^1+6*x^0 (no whitespace characters, the degree is always specified, the coefficient may be absent)
  • "at" functions (constant and non-constant) for accessing the coefficient of a polynomial by index
  • operator "()" for calculating a polynomial at a point (implemented using Horner's scheme)

About

My bigint implementation with shortcut functionality. Also implemented a class for finding the root of a polynomial, which shows the correct work with "bignum" numbers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published