Work on the equality of numbers. The good news: two additional unit tests pass.

The bad news: I'm getting segfaults.
This commit is contained in:
Simon Brooke 2026-02-15 00:50:30 +00:00
parent 219f082885
commit b97401bfde
2 changed files with 202 additions and 23 deletions

View file

@ -521,21 +521,3 @@ bool equal_integer_integer( struct cons_pointer a, struct cons_pointer b ) {
return result;
}
/**
* true if `a` is an integer, and `b` is a real number whose value is the
* value of that integer.
*/
bool equal_integer_real( struct cons_pointer a, struct cons_pointer b ) {
bool result = false;
if ( integerp( a ) && realp( b ) ) {
long double bv = pointer2cell( b ).payload.real.value;
if ( floor( bv ) == bv ) {
result = pointer2cell( a ).payload.integer.value == ( int64_t ) bv;
}
}
return result;
}