Created
December 27, 2013 05:19
-
-
Save mather/8142855 to your computer and use it in GitHub Desktop.
PARI/GPの紹介 ref: http://qiita.com/mather314/items/0399668ef3fbbfb4951e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ brew install pari |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ gp | |
| GP/PARI CALCULATOR Version 2.5.4 (released) | |
| i386 running darwin (x86-64 kernel) 64-bit version | |
| compiled: Oct 29 2013, gcc-5.0 (clang-500.2.79) (based on LLVM 3.3svn) | |
| (readline v6.2 enabled, extended help enabled) | |
| Copyright (C) 2000-2013 The PARI Group | |
| PARI/GP is free software, covered by the GNU General Public License, and comes WITHOUT ANY WARRANTY WHATSOEVER. | |
| Type ? for help, \q to quit. | |
| Type ?12 for how to get moral (and possibly technical) support. | |
| parisize = 8000000, primelimit = 500509 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ? galoisinit(x^2 + 1) | |
| %3 = [x^2 + 1, [5, 30, 931322574615478515625], [349392779948853795807, 581929794666624719818]~, [1, 1; 581929794666624719818, 349392779948853795807], 2, [Vecsmall([1, 2]), Vecsmall([2, 1])], [Vecsmall([2, 1])], Vecsmall([2])] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ? plot(X=-2,2,X^2+X-1) | |
| 5 |''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''" | |
| | "| | |
| | " | | |
| | x | | |
| | x | | |
| | " | | |
| | " | | |
| | " | | |
| | _" | | |
| | _ | | |
| | x | | |
| | x | | |
| | _" | | |
| | x | | |
| "_ _" | | |
| | "_ x | | |
| | x_ x" | | |
| ,,,,,,x_,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,x",,,,,,,,,,,,,,,,,,,,, | |
| | x_ _x" | | |
| | "x_ _x | | |
| | "x_ _x"" | | |
| -1.249433 |...............""xxx_______xx""...............................| | |
| -2 2 | |
| ? plot(X=-Pi, Pi, sin(X)) | |
| 0.9996892 |'''''''''''''''''''''''''''''''''''''''''''_x""""x_'''''''''''| | |
| | x" x_ | | |
| | _" x | | |
| | x " | | |
| | x "_ | | |
| | x _ | | |
| | " _ | | |
| | " _ | | |
| | " _ | | |
| | x _| | |
| _ x _ | |
| ```````````````````````````````x```````````````````````````````` | |
| |" x | | |
| | " _ | | |
| | " _ | | |
| | " _ | | |
| | " x | | |
| | "_ x | | |
| | _ x | | |
| | x _" | | |
| | "x _x | | |
| -0.999689 |..........."x____x"...........................................| | |
| -3.141593 3.141593 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ? 1 + 2 | |
| %1 = 3 | |
| ? 1 - 2 | |
| %2 = -1 | |
| ? 5 * 10 | |
| %3 = 50 | |
| ? 3 / 10 | |
| %4 = 3/10 | |
| ? %4 * 10 | |
| %5 = 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ? 2^10 | |
| %6 = 1024 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ? 5! | |
| %7 = 120 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ? 10 % 3 | |
| %9 = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ? exp(1) | |
| %12 = 2.7182818284590452353602874713526624978 | |
| ? Pi | |
| %15 = 3.1415926535897932384626433832795028842 | |
| ? 1 + I | |
| %18 = 1 + I | |
| ? %18^2 | |
| %19 = 2*I |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ? exp(1)^(I * Pi) | |
| %20 = -1.0000000000000000000000000000000000000 + 0.E-37*I |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ? x^2 + x + 1 | |
| %1 = x^2 + x + 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ? factor(x^2 - 1) | |
| %2 = | |
| [x - 1 1] | |
| [x + 1 1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment