开发者

using bigint class c++

开发者 https://www.devze.com 2023-03-23 21:25 出处:网络
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 ul

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 开发者_如何学Cvariable 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; 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号