mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-14 08:17:35 +02:00
Fixes for bignums
This commit is contained in:
parent
3f7753149e
commit
5641d7c7da
1 changed files with 4 additions and 10 deletions
|
@ -27,6 +27,7 @@
|
||||||
" Cyc_check_num(data, z);
|
" Cyc_check_num(data, z);
|
||||||
if (obj_is_int(z) ||
|
if (obj_is_int(z) ||
|
||||||
type_of(z) == integer_tag ||
|
type_of(z) == integer_tag ||
|
||||||
|
type_of(z) == bignum_tag ||
|
||||||
!isnan(((double_type *)z)->value))
|
!isnan(((double_type *)z)->value))
|
||||||
{
|
{
|
||||||
return_closcall1(data, k, boolean_f);
|
return_closcall1(data, k, boolean_f);
|
||||||
|
@ -37,21 +38,14 @@
|
||||||
" Cyc_check_num(data, z);
|
" Cyc_check_num(data, z);
|
||||||
if (obj_is_int(z) ||
|
if (obj_is_int(z) ||
|
||||||
type_of(z) == integer_tag ||
|
type_of(z) == integer_tag ||
|
||||||
|
type_of(z) == bignum_tag ||
|
||||||
!isinf(((double_type *)z)->value))
|
!isinf(((double_type *)z)->value))
|
||||||
{
|
{
|
||||||
return_closcall1(data, k, boolean_f);
|
return_closcall1(data, k, boolean_f);
|
||||||
}
|
}
|
||||||
return_closcall1(data, k, boolean_t);")
|
return_closcall1(data, k, boolean_t);")
|
||||||
(define-c finite?
|
(define (finite? z)
|
||||||
"(void *data, int argc, closure _, object k, object z)"
|
(if (infinite? z) #f #t))
|
||||||
" Cyc_check_num(data, z);
|
|
||||||
if (obj_is_int(z) ||
|
|
||||||
type_of(z) == integer_tag ||
|
|
||||||
!isfinite(((double_type *)z)->value))
|
|
||||||
{
|
|
||||||
return_closcall1(data, k, boolean_f);
|
|
||||||
}
|
|
||||||
return_closcall1(data, k, boolean_t);")
|
|
||||||
(define-c acos
|
(define-c acos
|
||||||
"(void *data, int argc, closure _, object k, object z)"
|
"(void *data, int argc, closure _, object k, object z)"
|
||||||
" return_inexact_double_op(data, k, acos, z);")
|
" return_inexact_double_op(data, k, acos, z);")
|
||||||
|
|
Loading…
Add table
Reference in a new issue