mersenneforum.org  

Go Back   mersenneforum.org > Math Stuff > Computer Science & Computational Number Theory > PARI/GP

Reply
 
Thread Tools
Old 2010-12-02, 21:22   #1937
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

203008 Posts
Default control characters

what I've found to work for me:


print("\t") -> tab
print("\n") -> newline

looking up things about javascript control characters gave me these.

never mind only; http://rosettacode.org/wiki/Special_...ters#PARI.2FGP which list 4 lol

Last fiddled with by science_man_88 on 2010-12-02 at 21:38
science_man_88 is offline   Reply With Quote
Old 2010-12-02, 22:15   #1938
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

10111010110112 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
the enters are easy the 0's are the hard part.

Code:
(16:28) gp > read_file_completely(file)= b=[];a=eval(Vec(Str(read(file))));b=concat(a,b);
(16:28) gp > read_file_completely("e:\\modulo.txt")
%279 = [3, 6, 9, 3, 6, 9, 3, 6, 9, 3, 6, 9, 3, 6, 9, 3, 6, 9, 3, 6, 9, 3, 6, 9, 3, 6, 9, 3, 6, 9]
also I can get the file up back in full i believe. I'd do it in the script lol.
Try this in a file:
1+1;v=n->n^2;
CRGreathouse is offline   Reply With Quote
Old 2010-12-02, 22:17   #1939
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

32208 Posts
Default

Charles; Can you make scripts in Sage? I'm too lazy to go through the whole process of trying to install and run it on here.

Last fiddled with by 3.14159 on 2010-12-02 at 22:18
3.14159 is offline   Reply With Quote
Old 2010-12-02, 22:27   #1940
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
Try this in a file:
1+1;v=n->n^2;
is there a way to fix pari back to installed defaults ? I played too much with things i hate the view lol.

it acted as code or gave me back an error lol but without it it didn't

Last fiddled with by science_man_88 on 2010-12-02 at 22:32
science_man_88 is offline   Reply With Quote
Old 2010-12-02, 22:30   #1941
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
I added those. The manual only has three, but I happen to know that \" also works.
CRGreathouse is offline   Reply With Quote
Old 2010-12-02, 22:32   #1942
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
is there a way to fix pari back to installed defaults ? I played too much with things i hate the view lol.
If you want to change the window, right-click, choose properties, choose the layout tab, and change the window size and/or the screen buffer size.
CRGreathouse is offline   Reply With Quote
Old 2010-12-02, 22:33   #1943
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
Charles; Can you make scripts in Sage? I'm too lazy to go through the whole process of trying to install and run it on here.
Sage uses Python for scripting, so that's the language you would use.
CRGreathouse is offline   Reply With Quote
Old 2010-12-02, 22:33   #1944
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

20C016 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
If you want to change the window, right-click, choose properties, choose the layout tab, and change the window size and/or the screen buffer size.
yeah well how come now when I open it it uses ? instead of what was before lol I can't find a setting there to do it lol.
science_man_88 is offline   Reply With Quote
Old 2010-12-02, 22:34   #1945
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
yeah well how come now when I open it it uses ? instead of what was before lol I can't find a setting there to do it lol.
That's the .gprc file. Go to it (probably under C:\Program Files\PARI\ or C:\Program Files (x86)\PARI\) and change the prompt line.
CRGreathouse is offline   Reply With Quote
Old 2010-12-02, 22:37   #1946
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
That's the .gprc file. Go to it (probably under C:\Program Files\PARI\ or C:\Program Files (x86)\PARI\) and change the prompt line.
I stupidly recycled it lmao.
science_man_88 is offline   Reply With Quote
Old 2010-12-02, 23:32   #1947
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24×3×5×7 Posts
Default

A prime number; 397^2 + 448^2, or 358313, is a prime number.

(6888*52)^2 + 1 = 128290046977 is also prime.

Lucky guesses, it seems..

Last fiddled with by 3.14159 on 2010-12-02 at 23:51
3.14159 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do I sometimes see all the <> formatting commands when I quote or edit? cheesehead Forum Feedback 3 2013-05-25 12:56
Passing commands to PARI on Windows James Heinrich Software 2 2012-05-13 19:19
Ubiquity commands Mini-Geek Aliquot Sequences 1 2009-09-22 19:33
64-bit Pari? CRGreathouse Software 2 2009-03-13 04:22
Are these commands correct? jasong Linux 2 2007-10-18 23:40

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


Fri Aug 6 22:56:10 UTC 2021 up 14 days, 17:25, 1 user, load averages: 4.42, 4.23, 4.01

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.