From d2a1d7c3299cb8102c6ea09387e9ef7a01490d89 Mon Sep 17 00:00:00 2001 From: dzaima Date: Sat, 12 Jun 2021 15:07:55 +0300 Subject: [PATCH] =?UTF-8?q?character=20=C2=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/builtins/arithd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/builtins/arithd.c b/src/builtins/arithd.c index 2bd6d818..437ff80d 100644 --- a/src/builtins/arithd.c +++ b/src/builtins/arithd.c @@ -193,10 +193,13 @@ GC2i(sub, wv-xv, { } } }) +GC2i(not, 1+wv-xv, { + if (isC32(w) & isF64(x)) { u64 r = (u64)(1+(i32)o2cu(w)-o2i64(x)); if(r>CHR_MAX)thrM("¬: Invalid character"); return m_c32((u32)r); } + if (isC32(w) & isC32(x)) return m_f64(1 + (i32)(u32)w.u - (i32)(u32)x.u); +}) GC2i(mul, wv*xv, {}) GC2i(and, wv*xv, {}) GC2i(or , (wv+xv)-(wv*xv), {}) -GC2i(not, 1+wv-xv, {}) GC2f(div , w.f/x.f, {}) GC2f(pow , pow(w.f, x.f), {})