mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2021-01-31, 11:58   #1
mersenne1588
 
Feb 2019

2810 Posts
Default 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 ++?
mersenne1588 is offline   Reply With Quote
Old 2021-01-31, 13:22   #2
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

29·367 Posts
Default

Quote:
Originally Posted by mersenne1588 View Post
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 ++?
I would recommend learning number theory.

You will make more progress more rapidly than writing code in any given programming language.
xilman is offline   Reply With Quote
Old 2021-01-31, 14:04   #3
mersenne1588
 
Feb 2019

348 Posts
Default

Quote:
Originally Posted by xilman View Post
I would recommend learning number theory.

You will make more progress more rapidly than writing code in any given programming language.
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 ++?
mersenne1588 is offline   Reply With Quote
Old 2021-01-31, 14:19   #4
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

361710 Posts
Default

Pari/GP is both expressive and good for prototyping. For speed C plus GMP, even assembly.
paulunderwood is offline   Reply With Quote
Old 2021-02-05, 21:24   #5
BudgieJane
 
BudgieJane's Avatar
 
"Jane Sullivan"
Jan 2011
Beckenham, UK

241 Posts
Default

Quote:
Originally Posted by mersenne1588 View Post
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 ++?
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.

Last fiddled with by BudgieJane on 2021-02-06 at 17:44 Reason: typo
BudgieJane is offline   Reply With Quote
Old 2021-02-05, 21:56   #6
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

41×229 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
Pari/GP is both expressive and good for prototyping. For speed C plus GMP, even assembly.
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 but much more reading and thinking. But you will be learning from the masters.
Batalov is offline   Reply With Quote
Old 2021-02-23, 19:31   #7
Billtorntn
 
Jan 2021

2 Posts
Default

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.
Billtorntn is offline   Reply With Quote
Old 2021-02-24, 05:17   #8
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

32×5×7×19 Posts
Default

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).
CRGreathouse is offline   Reply With Quote
Old 2021-03-14, 18:27   #9
drkirkby
 
"David Kirkby"
Jan 2021
Althorne, Essex, UK

7×13 Posts
Default

Sagemath https://www.sagemath.org/ 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.

Last fiddled with by Uncwilly on 2021-03-14 at 18:42 Reason: Removed fluff
drkirkby is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fast primality funcion in a programming language calimero22 Programming 15 2020-09-24 00:30
Basic Number Theory 1 & 2 Nick Number Theory Discussion Group 17 2017-12-23 20:10
Which programming language i shall learn? kakos22 Programming 4 2010-08-12 12:02
Easy number theory. mfgoode Puzzles 2 2006-05-30 09:46
number theory help math Homework Help 2 2004-05-02 18:09

All times are UTC. The time now is 17:13.

Tue Apr 13 17:13:37 UTC 2021 up 5 days, 11:54, 1 user, load averages: 4.94, 4.56, 4.46

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.