开发者

How to handle big integers (64 bit) numbers in tcl?

开发者 https://www.devze.com 2022-12-08 07:31 出处:网络
what is the best w开发者_如何转开发ay to handle big integers in expr command. we know wide in expr.As of Tcl 8.5, integers are now Bignums (arbitrary precision)

what is the best w开发者_如何转开发ay to handle big integers in expr command. we know wide in expr.


As of Tcl 8.5, integers are now Bignums (arbitrary precision)

If you're using an older version (which you've said you are, 8.4.x), you'll need to consider what you need to use the numbers for. Most of the standard commands won't accept Bignums, since it hadn't been added to the core at that time. However, if you're just doing math with them, you might want to take a look at

  • the tcllib package, which has a library for arbitrary precision math, or
  • the mexpr package.

Lastly, it's worth searching the Tclers Wiki for other options.

0

精彩评论

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