xo-numeric: + cmple for op<=

This commit is contained in:
Roland Conybeare 2026-03-12 20:54:23 -05:00
commit 1a60284861
12 changed files with 86 additions and 56 deletions

View file

@ -66,6 +66,14 @@ namespace xo {
x->value() < DFloat::value_type(y->value()));
}
obj<AGCObject>
FloatIntegerOps::cmp_lessequal(obj<ARuntimeContext> rcx,
DFloat * x, DInteger * y)
{
return DBoolean::box<AGCObject>(rcx.allocator(),
x->value() <= DFloat::value_type(y->value()));
}
// ----- Integer op Float -----
obj<AGCObject>
@ -120,6 +128,14 @@ namespace xo {
DFloat::value_type(x->value()) < y->value());
}
obj<AGCObject>
IntegerFloatOps::cmp_lessequal(obj<ARuntimeContext> rcx,
DInteger * x, DFloat * y)
{
return DBoolean::box<AGCObject>(rcx.allocator(),
DFloat::value_type(x->value()) <= y->value());
}
}
}