mersenneforum.org next after UBasic?
 User Name Remember Me? Password
 Register FAQ Search Today's Posts Mark Forums Read

 2019-08-15, 11:19 #1 mnh001   Apr 2011 1008 Posts next after UBasic? For all my programming needs involving math I use UBasic, which was built specifically for large integer number theoretic operations (2600 digits). It works great because the functionality is built in so you don't have to go through programming coniptions just to get a result out of it. However the day will come when my 32-bit machines (XP and Win7) will no longer operate. And to use UBasic on a 64-bit machine requires a shell program (like Dos-Box) where it runs approx. 30 times slower. Being slow is not a positive selling point. So the question is: what other programming languages are out there that can do large integer math? How much functionality is built in? What kind of learning curve have they?
 2019-08-15, 11:55 #2 R. Gerbicz     "Robert Gerbicz" Oct 2005 Hungary 2×3×11×23 Posts Try Pari-gp: https://pari.math.u-bordeaux.fr/ .
 2019-08-15, 12:29 #3 paulunderwood     Sep 2002 Database er0rr 2×7×281 Posts
 2019-08-16, 10:16 #4 Xyzzy     Aug 2002 22×2,087 Posts https://rosettacode.org/wiki/Arbitra...gers_(included) Edit: Python is very easy to learn.
 2019-08-16, 12:05 #5 mnh001   Apr 2011 10000002 Posts Thanks for the suggestions. Do these programs come as a complete package? Ie, open the installer and it installs everything needed to run? Or do they just install part, then I have to go over here to get the data files and over there to get the libraries, etc? (I always have trouble with that.)
2019-08-16, 12:29   #6
xilman
Bamboozled!

"𒉺𒌌𒇷𒆷𒀭"
May 2003
Down not across

254208 Posts

Quote:
 Originally Posted by mnh001 Thanks for the suggestions. Do these programs come as a complete package? Ie, open the installer and it installs everything needed to run? Or do they just install part, then I have to go over here to get the data files and over there to get the libraries, etc? (I always have trouble with that.)
IME, Pari/gp is a one-shot installer, unless you want to do something unusually specialized. If you have been happy with UBASIC (and I was 25 years ago when I was running APRT-CL on x^y+y^x numbers) you are not doing anything particularly unusual,

2019-08-16, 13:22   #7
paulunderwood

Sep 2002
Database er0rr

75368 Posts

Quote:
 Originally Posted by mnh001 Thanks for the suggestions. Do these programs come as a complete package? Ie, open the installer and it installs everything needed to run? Or do they just install part, then I have to go over here to get the data files and over there to get the libraries, etc? (I always have trouble with that.)
Pari/GP is one download. It is well documented and is supported by the community, including mersenneforum.

It has a special number theory section which allows you to do thing such as forprime(), fordiv(), isprime(), ispseudoprime() etc. Enter ? or ?? or ??? at the command line for detailed help.

You can run interactively at the command line either with gp or gp -q. Or you can interpret a file containing commands; you can pipe it and you can use it as a C library.

Try it out on the site's webpage or try the download either for Windows, Linux. Mac or Android.

It is algoloid and does not suffer from spaghetti code associated with BASIC.

Last fiddled with by paulunderwood on 2019-08-16 at 13:40

 2019-08-16, 17:54 #8 mnh001   Apr 2011 26 Posts Great info guys. I appreciate it. I might have to try both. Another question comes to mind. I don't usually do anything with graphics but do either of these have a GUI? Like say I wanted to draw a square with a slider below it and the color of the square changed depending on the value of the slider. Is something like that possible?
2019-08-16, 19:10   #9
paulunderwood

Sep 2002
Database er0rr

F5E16 Posts

Quote:
 Originally Posted by mnh001 Great info guys. I appreciate it. I might have to try both. Another question comes to mind. I don't usually do anything with graphics but do either of these have a GUI? Like say I wanted to draw a square with a slider below it and the color of the square changed depending on the value of the slider. Is something like that possible?
I not sure that Pari/GP can do it. Here is a list of plot commands:

Code:
plot           plotdraw       plotlines      plotrbox       plotscale
plotbox        ploth          plotlinetype   plotrecth      plotstring
plotclip       plothraw       plotmove       plotrecthraw
plotcolor      plothsizes     plotpoints     plotrline
plotcopy       plotinit       plotpointsize  plotrmove
plotcursor     plotkill       plotpointtype  plotrpoint
Attached is the result of ploth(x=1,10,x^2*sin(x))
Attached Thumbnails

Last fiddled with by paulunderwood on 2019-08-16 at 19:10

 Similar Threads Thread Thread Starter Forum Replies Last Post Andi47 Programming 7 2009-02-27 00:20 Andi47 Programming 16 2009-02-20 06:41 Andi47 Programming 5 2008-12-28 05:52 rn0dal Programming 6 2004-09-15 14:57 dsouza123 Programming 28 2003-11-23 18:20

All times are UTC. The time now is 20:18.

Mon Nov 29 20:18:30 UTC 2021 up 129 days, 14:47, 0 users, load averages: 1.98, 1.63, 1.48