简体   繁体   中英

using bigint class c++

I am solving a problem where I need to deal with 120 digit binary numbers. there is no simple data type and I have understood I need to use bigint. I am using 64 bit win 7 HB and visual studio 2010 ultimate as my ide for c++.

Can any one explain how do I create variable of bigint and how do I perform functions of square and square root on them.

The OpenSSL project provides a Big Integer library.
Google "OpenSSL Big Integer"

Use this library.. https://mattmccutchen.net/bigint/

and perform calculations as normal..

a = 12333333333333333333333333333333333;
cout << a * a; 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM