https://github.com/alexcoder04/prime-checker
A simple program to check whether a number is prime on the TI-Nspire
https://github.com/alexcoder04/prime-checker
calculator lua math nspire nspired-lua prime-numbers primes ti-nspire ti-nspire-calculators
Last synced: 3 months ago
JSON representation
A simple program to check whether a number is prime on the TI-Nspire
- Host: GitHub
- URL: https://github.com/alexcoder04/prime-checker
- Owner: alexcoder04
- License: gpl-3.0
- Created: 2021-10-04T17:35:39.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-25T09:31:14.000Z (about 2 years ago)
- Last Synced: 2025-02-09T08:23:51.080Z (5 months ago)
- Topics: calculator, lua, math, nspire, nspired-lua, prime-numbers, primes, ti-nspire, ti-nspire-calculators
- Language: Lua
- Homepage:
- Size: 7.31 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# prime-checker for TI-Nspire
A very simple program to check if a number is prime on the TI-Nspire calculator.
## Method
Just checking all dividers until the square root, using the simple `6k ± 1`
optimization method ([wikipedia](https://en.wikipedia.org/wiki/Primality_test#Example_code)).## Installation
### Relesases page
For pre-built `.tns`-files, check out the
[latest release](https://github.com/alexcoder04/prime-checker/releases/latest) and copy the
`.tns`-file onto your calculator.### Compiling yourself
#### Requirements
- [Luna](https://github.com/ndless-nspire/Luna)
- [nspire-merge](https://github.com/alexcoder04/nspire-merge)
- [GNU Make](https://www.gnu.org/software/make/)#### Building
Running `make clean build` in the project directory will create a `prime-checker.tns` file
which can be copied onto the calculator## Note
Depending on you exact model and settings, you may already have the built-in `isPrime()`-method :)
## Features to be implemented in the future (maybe)
- [ ] factorisation into primes