How to handle big numbers?

前端 未结 6 2095
独厮守ぢ
独厮守ぢ 2020-12-18 12:34

I have a very large number, assume some transaction id or big money involved. So, how I will handle the calculation on these ( add, multiple etc). Does any other was to sto

6条回答
  •  无人及你
    2020-12-18 13:00

    You use a library that handles big numbers, like The GNU Multiple Precision Arithmetic Library which seems to be the most common. Or if you want Boost specifically, there's always the Multiprecision library (which can use GMP as backend).

提交回复
热议问题