Store and perform operations with huge numbers in iOS

前端 未结 3 1722
情歌与酒
情歌与酒 2020-12-19 19:07

How could I handle operations with a number like: 485345883069611330679681969652579614157566565218188487507235474776734576700196328825241646476514920257289805718335793417439

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-19 19:36

    You can try here : http://gmplib.org/

    GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. There is no practical limit to the precision except the ones implied by the available memory in the machine GMP runs on. GMP has a rich set of functions, and the functions have a regular interface.

提交回复
热议问题