This commit is contained in:
Mike 2023-08-25 12:20:12 +03:00
parent f9bd0c8260
commit 8cb939e654
2 changed files with 2209 additions and 0 deletions

2190
primality_test.json Normal file

File diff suppressed because it is too large Load diff

19
test-wycheproof.l Normal file
View file

@ -0,0 +1,19 @@
(load "@lib/json.l")
(load "isprime.l")
(mapc
'((L)
(let
(N (hex (cdr (assoc "value" L)))
R (cdr (assoc "result" L))
I (prime? N 64) )
(prin ".")
(flush)
(cond
((and (= R "invalid") (not I)))
((and (= R "valid") I))
(T (quit "Boom!")) ) ) )
(cddr (cadadr (assoc "testGroups" (in "primality_test.json" (readJson))))) )
(prinl)
(msg 'ok)
(bye)