An open API service indexing awesome lists of open source software.

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

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