/** @file IntegerOps.cpp * * @author Roland Conybeare, Feb 2026 **/ #include "IntegerOps.hpp" #include "integer/INumeric_DInteger.hpp" #include namespace xo { using xo::scm::DBoolean; using xo::mm::AGCObject; namespace scm { obj IntegerOps::multiply(obj rcx, DInteger * x, DInteger * y) { return DInteger::box(rcx.allocator(), x->value() * y->value()); } obj IntegerOps::divide(obj rcx, DInteger * x, DInteger * y) { return DInteger::box(rcx.allocator(), x->value() / y->value()); } obj IntegerOps::add(obj rcx, DInteger * x, DInteger * y) { return DInteger::box(rcx.allocator(), x->value() + y->value()); } obj IntegerOps::subtract(obj rcx, DInteger * x, DInteger * y) { return DInteger::box(rcx.allocator(), x->value() - y->value()); } obj IntegerOps::cmp_equal(obj rcx, DInteger * x, DInteger * y) { return DBoolean::box(rcx.allocator(), x->value() == y->value()); } obj IntegerOps::cmp_notequal(obj rcx, DInteger * x, DInteger * y) { return DBoolean::box(rcx.allocator(), x->value() != y->value()); } obj IntegerOps::cmp_less(obj rcx, DInteger * x, DInteger * y) { return DBoolean::box(rcx.allocator(), x->value() < y->value()); } obj IntegerOps::cmp_lessequal(obj rcx, DInteger * x, DInteger * y) { return DBoolean::box(rcx.allocator(), x->value() <= y->value()); } } } /* end IntegerOps.cpp */