20190717, 23:24  #1 
Mar 2016
3^{2}·41 Posts 
suggested computer language for explaining some algorithms
A peaceful and pleasent night for you,
what kind of computer language would you suggest for a mathematical book about number theory in order to illustrate the algorithms ? The programming language should be a) easy to understand, b) supported for a long time (20 years at least) and c) usable for different operation systems I used Mupad some years ago, but it is vanished. Recommandations ? Greetings from the polynomial rings Bernhard Last fiddled with by bhelmes on 20190717 at 23:25 
20190717, 23:28  #2 
If I May
"Chris Halsall"
Sep 2002
Barbados
10,039 Posts 

20190718, 00:36  #3 
"Curtis"
Feb 2005
Riverside, CA
11711_{8} Posts 
Perhaps psuedocode for illustration, but actual code isn't called for in a math text.
If you can't explain the algo in human language, your exposition needs work. 
20190718, 01:40  #4 
Apr 2019
5×41 Posts 
PARI/GP is convenient for math and number theory related algorithms.

20190718, 02:39  #5 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest
2^{2}×7×211 Posts 
Just bouncing some ideas around here:
natural language, constructs like if then, else, until, while, for, and parentheses; whichever language more readers of the book are likely to already know; perhaps vary the language among a very small set according to which seems to best suit the specific situation; something included at Rosetta Code; something available at no additional cost or very low for your students if this is for teaching; Wolfram (Mathematica) but very costly; stay with what you know; MATLAB has an optional toolbox with MuPAD (and interfaces with various other languages) https://en.wikipedia.org/wiki/MATLAB. MATLAB student cost doesn't look too bad. Last fiddled with by kriesel on 20190718 at 02:47 
20190718, 05:48  #6 
Romulan Interpreter
"name field"
Jun 2011
Thailand
2×4,903 Posts 
Pascal.
No (big) difference from pseudocode, humanlike, easy to explain any algorithm in it, easy to be rewritten in any other language. In C, you can easy compile most of Pascal source code just #defining "begin" to "{", end to ";}", and a couple of other tricks. Technically, if you have the logic diagram (with blocks) in front of you, or in your mind, writing Pascal programs from it is just a piece of pizza... After learning Fortran and Basic in high school (for Fortran we used punched cards on a Felix C256 our highschool owned, and for Basic it was the early days of the intel 8080, etc and we had a M18 with centronix console  i.e. printing on paper, this was earlier than the displays and terminals era), we went to uni where they used to teach us Pascal (on Coral,  you MUST click this link!  and serial DAF2020/VT100 terminals in all the building, no listing papers and punch cards anymore), and it was such a revelation... (we studied C started from the second year at uni). Last fiddled with by LaurV on 20190718 at 05:48 
20190718, 13:11  #7  
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest
2^{2}×7×211 Posts 
Quote:
I first learned Fortran in the waitforakeypunchtobefree days, then BASIC, various assemblers, c, Pascal, others. Pascal seemed a step up from Fortran toward natural language, and c a step in the other direction toward assembler. https://en.wikipedia.org/wiki/Pascal...mming_language) 

20190718, 19:35  #8 
"Alexander"
Nov 2008
The Alamo City
773 Posts 
Current college students have virtually no experience with Pascal (which is a shame, since I've heard great things about it). One of my professors was a huge fan of PL/I, lamenting its loss to C.
I think you should probably use pseudocode when targeting a nonCS audience. If it needs to be an actual, modern language, Python and Ruby are readable, crossplatform languages you can use. 
20190718, 20:27  #9  
Bamboozled!
"πΊππ·π·π"
May 2003
Down not across
103×107 Posts 
Quote:
Almost any form of pseudocode should be sufficient. That used by Knuth in TAOCP is a classic of clear and precise specification. 

20190718, 22:50  #10 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest
2^{2}·7·211 Posts 

20190719, 00:47  #11  
Mar 2016
561_{8} Posts 
Quote:
Perhaps my english knowledge is not perfect, and may be the chinese reader will not detect every thought, therefore a second explication could improve some knowledge transfair easier. Last fiddled with by bhelmes on 20190719 at 00:47 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
On the origin of language ...  Dr Sardonicus  Lounge  28  20181010 19:52 
Explaining gnfs to davar55 in words of one sound  davar55  Factoring  18  20150720 12:48 
ignoring suggested value  Vimpy  Software  6  20060912 21:00 
ASUS A7N8X Deluxe and suggested RAM?  111393  Hardware  1  20040126 12:29 