https://github.com/jasory/nt-bind
Bindings for ENT in various languages
https://github.com/jasory/nt-bind
Last synced: 4 months ago
JSON representation
Bindings for ENT in various languages
- Host: GitHub
- URL: https://github.com/jasory/nt-bind
- Owner: JASory
- Created: 2023-01-10T19:01:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-27T00:56:50.000Z (over 3 years ago)
- Last Synced: 2025-10-04T02:29:28.381Z (8 months ago)
- Language: Ada
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NT-Bind
Bindings for ENT functions for 32 and 64-bit integers in various languages. Targeting gcc, g++, gfortran, and gnat. May work in other compilers but it is not currently designed to. To use this library run
```bash
git clone https:://github.com/JASory/NT-Bind
```
Go into the directory
```bash
cd NT-Bind
```
Compile the library one of three ways: dynamic {default}, static, or Debian package {dynamic}
### Dynamic
```bash
cargo build --release
```
Then copy the library produced to /lib/. All further instructions are assuming that the user has copied the library to /lib
```bash
cp NT-Bind/target/release/libnumbertheory.so /lib/libnumbertheory.so
```
### Static
Edit the Cargo.toml to change the cdylib to staticlib. Then perform the same steps as with the dynamic example except now the library is called libnumbertheory.a
### Debian package
Enter the NT-Bind folder and run cargo deb {if it has been installed}
```bash
cd NT-Bind && cargo deb
```
Then install the debian package. This will automatically install the dynamic library into the /lib folder
```bash
apt install NT-Bind/target/release/nt-bind-0.0.18.deb
```
In the future this library may be distributed in the Debian repository
# Ada
Generically implemented NumberTheory for all `T in range <>` and `T in mod <>`
To use run
```bash
gnatmake test.adb -largs /lib/numbertheory
```
gnatmake will automatically compile the other files that nt_ada.adb depends on.
Ada implements exception handling for values that cannot be computed within the integer range or do not exist
# C
Not implemented
# C++
Not implemented
# Fortran
Generically implemented NumberTheory for Integer(Kind=4) and Integer(Kind=8)
To use run
```bash
gfortran test.f08 numbertheory.f08 /lib/numbertheory.so
```
# Julia
To use this library include it at the start of the file or REPL. (incomplete)
``` julia
include("/Nt-Bind/numbertheory.jl")
```
# Python
Not implemented