mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-03 19:26:34 +02:00
Issue #209 - Starting SRFI 143
This commit is contained in:
parent
464a9e4195
commit
c45aa16b30
1 changed files with 15 additions and 1 deletions
16
srfi/143.sld
16
srfi/143.sld
|
@ -17,7 +17,8 @@
|
|||
;fxzero? fxpositive? fxnegative? fxodd? fxeven?
|
||||
;fx= fx< fx> fx<= fx>=
|
||||
;fxmax fxmin
|
||||
;fx+ fx- fx*
|
||||
fx+
|
||||
;fx- fx*
|
||||
;fxabs fxsquare fxsqrt fxexpt
|
||||
;fx+/carry
|
||||
;fx-/carry
|
||||
|
@ -51,6 +52,13 @@
|
|||
;fxfold fxfor-each fxunfold
|
||||
;fxlogical-shift
|
||||
)
|
||||
(inline
|
||||
fx-width
|
||||
fx-greatest
|
||||
fx-least
|
||||
fixnum?
|
||||
fx+
|
||||
)
|
||||
(begin
|
||||
(define (fx-width) 31)
|
||||
(define (fx-greatest) 1073741823)
|
||||
|
@ -59,5 +67,11 @@
|
|||
"(void *data, int argc, closure _, object k, object obj)"
|
||||
" return_closcall1(data, k,
|
||||
obj_is_int(obj) ? boolean_t : boolean_f); ")
|
||||
(define-c fx+
|
||||
"(void *data, int argc, closure _, object k, object i, object j)"
|
||||
" Cyc_check_fixnum(data, i);
|
||||
Cyc_check_fixnum(data, j);
|
||||
object result = obj_int2obj(obj_obj2int(i) + obj_obj2int(j));
|
||||
return_closcall1(data, k, result); ")
|
||||
))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue