mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 21:59:17 +02:00
a SRFI 60 installed which imports (scheme base). This can still break in theory if a user installs a third-party SRFI 33 in the search path in front of the Chibi SRFI 33, but we can't always be safe against such behavior. Fixes issue #267.
13 lines
485 B
Scheme
13 lines
485 B
Scheme
|
|
(define-library (chibi math prime)
|
|
(import (scheme base) (scheme inexact) (srfi 27))
|
|
(cond-expand
|
|
((library (srfi 33)) (import (srfi 33)))
|
|
(else (import (srfi 60))))
|
|
(export prime? nth-prime prime-above prime-below factor perfect?
|
|
totient aliquot
|
|
provable-prime? probable-prime?
|
|
random-prime random-prime-distinct-from
|
|
coprime? random-coprime modular-inverse modular-expt
|
|
miller-rabin-composite?)
|
|
(include "prime.scm"))
|