Most efficient implementation of a large number class

前端 未结 5 910
情歌与酒
情歌与酒 2020-12-02 00:33

When doing calculations on very large numbers where integral data types such as double or int64 falls short, a separate class to handle such large numbers may be needed.

5条回答
  •  温柔的废话
    2020-12-02 01:19

    Doing your own BigNum library is complicated, so i'd say like jjnguy. Use whatever your language offers as libraries.

    In .net, reference the VisualJ dll as they contain the BigInteger and BigDecimal classes. You should however be aware of some limitations of these libraries, like the lack of a square root method, for example.

提交回复
热议问题