What programming language will enable me to enter a very long number without converting it to floating point?

后端 未结 14 825
情书的邮戳
情书的邮戳 2020-12-11 21:17

What would be the best way to do the following.

Enter a very long number, lets say 500,000 digits long without it going into scientific notation; and then am able to

相关标签:
14条回答
  • 2020-12-11 21:27

    Python and Java have native support, libraries exist for C++, C, .NET, ...

    0 讨论(0)
  • 2020-12-11 21:27

    MIT/GNU Scheme has support for arbitrarily large numbers.

    0 讨论(0)
  • 2020-12-11 21:29

    I find Python quite good for this.

    0 讨论(0)
  • 2020-12-11 21:32

    I know that Erlang has support for unlimited size int arithmetics.

    0 讨论(0)
  • 2020-12-11 21:36

    Perl, Python, Ruby, and Java can all do that. External libraries exist for everything else.

    I rather like Ruby and Python because they automatically switch from Fixnum to Bignum. (Python: int to long.)

    0 讨论(0)
  • 2020-12-11 21:38

    In C or C++, you can use GMP (Gnu Multi-Precision library).

    In Perl, you can use the bignum module.

    0 讨论(0)
提交回复
热议问题