mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Revert change to (integer?) for now
Causes unit test failures, need to sort this out separately.
This commit is contained in:
parent
b626c4c6b7
commit
ec7c3c3308
2 changed files with 8 additions and 4 deletions
|
@ -6,9 +6,12 @@ Bug Fixes
|
|||
|
||||
- Fix from Petr Pražák to avoid compilation errors when using newer versions of LibTomMath.
|
||||
- Avoid cases where bignums are not initialized properly by the runtime and incorrectly retain a value of zero.
|
||||
- Handle the following edge cases from R7RS:
|
||||
- Handle the following edge case from R7RS:
|
||||
|
||||
> If `z` is a complex number, then `(real? z)` is true if and only if `(zero? (imag-part z))` is true. If `x` is an inexact real number, then `(integer? x)` is true if and only if `(= x (round x))`.
|
||||
> If `z` is a complex number, then `(real? z)` is true if and only if `(zero? (imag-part z))` is true.
|
||||
|
||||
|
||||
TBD: If `x` is an inexact real number, then `(integer? x)` is true if and only if `(= x (round x))`.
|
||||
|
||||
## 0.9.8 - February 16, 2019
|
||||
|
||||
|
|
|
@ -1699,8 +1699,9 @@ object Cyc_is_integer(object o)
|
|||
{
|
||||
if ((o != NULL) && (obj_is_int(o) ||
|
||||
(!is_value_type(o) && type_of(o) == integer_tag) ||
|
||||
(!is_value_type(o) && type_of(o) == bignum_tag) ||
|
||||
(!is_value_type(o) && type_of(o) == double_tag && double_value(o) == round(double_value(o))))) // Per R7RS
|
||||
(!is_value_type(o) && type_of(o) == bignum_tag)
|
||||
// || (!is_value_type(o) && type_of(o) == double_tag && double_value(o) == round(double_value(o)))
|
||||
)) // Per R7RS
|
||||
return boolean_t;
|
||||
return boolean_f;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue