Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/syncom/prime_classes
Pari-GP script for classification of a prime number
https://github.com/syncom/prime_classes
Last synced: 4 days ago
JSON representation
Pari-GP script for classification of a prime number
- Host: GitHub
- URL: https://github.com/syncom/prime_classes
- Owner: syncom
- Created: 2017-01-21T06:14:45.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-03-07T06:48:20.000Z (8 months ago)
- Last Synced: 2024-03-07T07:47:48.436Z (8 months ago)
- Size: 8.79 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Classification of a prime number in the Pari-GP Programming Language
## How to install Pari-GP (On Ubuntu)
```
sudo apt-get install pari-gp
```## How to run
In `gp` console:
```
\r prime_classes.gp
p=2017
iswhatprime(p)
```To run the script from a Linux shell (e.g., for automation), use `gp`'s
`-q` option:
```
$ (cat prime_classes.gp; echo "p=2017;"; echo "iswhatprime(p)") | gp -q
```