Complete splitting code into source files.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "ref.hpp"
|
||||
#include "util.hpp"
|
||||
extern "C" {
|
||||
#include "libabacus.h"
|
||||
}
|
||||
@@ -12,7 +14,7 @@ extern "C" {
|
||||
mpfr_t output; \
|
||||
mpfr_init2(output, PRECISION); \
|
||||
mpfr_##func(output, value->value, MPFR_RNDN); \
|
||||
abacus_ref to_return = create_value<number>(ab, new number(std::move(output))); \
|
||||
ref to_return = create_value<number>(ab, new number(std::move(output))); \
|
||||
libab_ref_copy(to_return, into); \
|
||||
return LIBAB_SUCCESS; \
|
||||
}
|
||||
@@ -23,7 +25,7 @@ extern "C" {
|
||||
mpfr_t output; \
|
||||
mpfr_init2(output, PRECISION); \
|
||||
mpfr_##func(output, left->value, right->value, MPFR_RNDN); \
|
||||
abacus_ref to_return = create_value<number>(ab, new number(std::move(output))); \
|
||||
ref to_return = create_value<number>(ab, new number(std::move(output))); \
|
||||
libab_ref_copy(to_return, into); \
|
||||
return LIBAB_SUCCESS; \
|
||||
}
|
||||
@@ -39,23 +41,31 @@ FUNCTION(print_string);
|
||||
FUNCTION(to_string_num);
|
||||
FUNCTION(to_string_bool);
|
||||
FUNCTION(to_string_unit);
|
||||
|
||||
FUNCTION(plus);
|
||||
FUNCTION(minus);
|
||||
FUNCTION(times);
|
||||
FUNCTION(divide);
|
||||
FUNCTION(pow);
|
||||
|
||||
FUNCTION(lt);
|
||||
FUNCTION(lte);
|
||||
FUNCTION(equals);
|
||||
FUNCTION(gt);
|
||||
FUNCTION(gte);
|
||||
|
||||
FUNCTION(negate);
|
||||
|
||||
FUNCTION(ln);
|
||||
FUNCTION(exp);
|
||||
|
||||
FUNCTION(sin);
|
||||
FUNCTION(cos);
|
||||
FUNCTION(tan);
|
||||
|
||||
FUNCTION(arcsin);
|
||||
FUNCTION(arccos);
|
||||
FUNCTION(arctan);
|
||||
|
||||
FUNCTION(quit);
|
||||
FUNCTION(request_precision);
|
||||
|
||||
Reference in New Issue
Block a user