mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Software (https://www.mersenneforum.org/forumdisplay.php?f=10)
-   -   Which programming language is recommended in number theory? (https://www.mersenneforum.org/showthread.php?t=26460)

mersenne1588 2021-01-31 11:58

Which programming language is recommended in number theory?
 
I am interested in various topics in number theory (Mersenne Prime Search, Goldbach's conjecture, Collatz conjecture, odd perfect numbers, etc ...).

If I would like to carry out tests myself according to my ideas in this context and if I would like to learn therefor a corresponding programming language, which programming language can you recommend? C ++?

xilman 2021-01-31 13:22

[QUOTE=mersenne1588;570562]I am interested in various topics in number theory (Mersenne Prime Search, Goldbach's conjecture, Collatz conjecture, odd perfect numbers, etc ...).

If I would like to carry out tests myself according to my ideas in this context and if I would like to learn therefor a corresponding programming language, which programming language can you recommend? C ++?[/QUOTE]I would recommend learning number theory.

You will make more progress more rapidly than writing code in any given programming language.

mersenne1588 2021-01-31 14:04

[QUOTE=xilman;570565]I would recommend learning number theory.

You will make more progress more rapidly than writing code in any given programming language.[/QUOTE]

I already have some experience in number theory. I just want to know if I want to carry out various tests and program them myself, which programming language is recommended here? C ++?

paulunderwood 2021-01-31 14:19

Pari/GP is both expressive and good for prototyping. For speed C plus GMP, even assembly.:smile:

BudgieJane 2021-02-05 21:24

[QUOTE=mersenne1588;570569]I already have some experience in number theory. I just want to know if I want to carry out various tests and program them myself, which programming language is recommended here? C ++?[/QUOTE]

Do you have any programming experience already? If the answer to that is "no" then you do not want to learn a programming language such as C++, because you will spend all your time fiddling with trivial programming details trying to get your programs right, and none of your time doing your number theory research. I suggest you follow Paul Underwood's advice and look at Pari/GP, which is a prewritten package designed for the sort of use you are looking for.

Batalov 2021-02-05 21:56

[QUOTE=paulunderwood;570571]Pari/GP is both expressive and good for prototyping. For speed C plus GMP, even assembly.:smile:[/QUOTE]
Pari/GP - Seconded/thirded! Great for prototyping in one-two lines, and for learning.

Same for speed, plus to C plus GMP... you can link to GWNUM for many good things. Just need to learn the APIs. You can also borrow from the masters - you take the well-respected tool, understand its source, and code about your problem using that envelope and all facilities that come with it, and recompile. This approach requires less coding [I]but much more reading[/I] and thinking. But you will be learning from the masters.

Billtorntn 2021-02-23 19:31

I can recommend you Python, however, its implementation can be slow. Also, you may consider C++ and Java if you aren't afraid of lots of syntax.
PARI/GP is C-based as well. So I upvote the previously mentioned replies too.

CRGreathouse 2021-02-24 05:17

PARI/GP is good, and since PARI is a C library it transitions well into that language for higher-performance computing when needed (you can use gp2c if you want to live in both worlds).

drkirkby 2021-03-14 18:27

Sagemath [url]https://www.sagemath.org/[/url] is particularly strong on number theory. It includes Pari/GP. I spent many man months working on porting Sage, as it was called then, to Solaris. My mathematical input is zero.

It seems a bit pointless to me trying to learn C++ to do number theory. Two quite different skills, and no need to mix the two.


All times are UTC. The time now is 11:22.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.