xo-reader2 stack: + xo-numeric + setup multi dispatch for *,/
This commit is contained in:
parent
b8fd087319
commit
ac1395ce98
28 changed files with 912 additions and 70 deletions
31
src/numeric/FloatOps.cpp
Normal file
31
src/numeric/FloatOps.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/** @file FloatOps.cp
|
||||
*
|
||||
* @author Roland Conybeare, Feb 2206
|
||||
**/
|
||||
|
||||
#include "FloatOps.hpp"
|
||||
#include "float/INumeric_DFloat.hpp"
|
||||
|
||||
namespace xo {
|
||||
using xo::mm::AGCObject;
|
||||
|
||||
namespace scm {
|
||||
|
||||
obj<AGCObject>
|
||||
FloatOps::multiply(obj<ARuntimeContext> rcx,
|
||||
DFloat * x, DFloat * y)
|
||||
{
|
||||
return DFloat::box<AGCObject>(rcx.allocator(), x->value() * y->value());
|
||||
}
|
||||
|
||||
obj<AGCObject>
|
||||
FloatOps::divide(obj<ARuntimeContext> rcx,
|
||||
DFloat * x, DFloat * y)
|
||||
{
|
||||
return DFloat::box<AGCObject>(rcx.allocator(), x->value() / y->value());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* end FloatOps.cpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue