mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-25 04:55:04 +02:00
Added (bignum?)
This commit is contained in:
parent
a6cbce207c
commit
371b4630eb
1 changed files with 3 additions and 0 deletions
|
@ -1078,6 +1078,9 @@
|
||||||
(if (>= res 0) res (+ res b)))))
|
(if (>= res 0) res (+ res b)))))
|
||||||
(define (odd? num) (= (modulo num 2) 1))
|
(define (odd? num) (= (modulo num 2) 1))
|
||||||
(define (even? num) (= (modulo num 2) 0))
|
(define (even? num) (= (modulo num 2) 0))
|
||||||
|
(define-c bignum?
|
||||||
|
"(void *data, int argc, closure _, object k, object obj)"
|
||||||
|
" return_closcall1(data, k, Cyc_is_bignum(obj)); ")
|
||||||
;; from mosh
|
;; from mosh
|
||||||
(define (exact-integer-sqrt k)
|
(define (exact-integer-sqrt k)
|
||||||
(unless (and (exact? k)
|
(unless (and (exact? k)
|
||||||
|
|
Loading…
Add table
Reference in a new issue