aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2026-01-11 15:27:56 -0500
committerBruce Hill <bruce@bruce-hill.com>2026-01-11 15:27:56 -0500
commit3dc89f2fd1705f03b8838e2afce80f691b709d63 (patch)
tree17fafdf1a5723c079c4c42cc3459590abdedb4c7 /src/stdlib
parentbb4c931fc660eca5cc28f637873386bfb3a6b56b (diff)
Misc fixes
Diffstat (limited to 'src/stdlib')
-rw-r--r--src/stdlib/reals.c3
-rw-r--r--src/stdlib/reals.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/stdlib/reals.c b/src/stdlib/reals.c
index 87d1e64a..616fd38d 100644
--- a/src/stdlib/reals.c
+++ b/src/stdlib/reals.c
@@ -700,7 +700,8 @@ OptionalReal_t Real$parse(Text_t text, Text_t *remainder) {
return box_ptr(r, REAL_TAG_RATIONAL);
}
-static bool Real$is_none(const void *vn, const TypeInfo_t *type) {
+public
+PUREFUNC bool Real$is_none(const void *vn, const TypeInfo_t *type) {
(void)type;
Real_t n = *(Real_t *)vn;
return is_boxed(n) && get_tag(n) == REAL_TAG_NONE;
diff --git a/src/stdlib/reals.h b/src/stdlib/reals.h
index 10c071f9..d03e4e5f 100644
--- a/src/stdlib/reals.h
+++ b/src/stdlib/reals.h
@@ -3,6 +3,7 @@
#include "datatypes.h"
#include "types.h"
+#include "util.h"
// NaN-boxing scheme: use quiet NaN space for pointers
// IEEE 754: NaN = exponent all 1s, mantissa non-zero
@@ -21,6 +22,7 @@
Int_t Real$as_int(Real_t x, bool truncate);
OptionalReal_t Real$parse(Text_t text, Text_t *remainder);
+PUREFUNC bool Real$is_none(const void *vn, const TypeInfo_t *type);
Real_t Real$abs(Real_t x);
Real_t Real$acos(Real_t x);
Real_t Real$asin(Real_t x);
@@ -49,6 +51,7 @@ Real_t Real$sin(Real_t x);
Real_t Real$sqrt(Real_t x);
Real_t Real$tan(Real_t x);
Real_t Real$times(Real_t x, Real_t y);
+Text_t Real$as_text(const void *n, bool colorize, const TypeInfo_t *type);
Text_t Real$value_as_text(Real_t x);
bool Real$equal(const void *va, const void *vb, const TypeInfo_t *t);
bool Real$is_between(Real_t x, Real_t low, Real_t high);