aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/reals.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-12-16 23:31:06 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-12-16 23:31:06 -0500
commitf07c07e551b89b66b14936ae4573e656fbd7afb6 (patch)
tree3c9acb1228c7e74ce671661bf9c15616e0cfc7f7 /src/stdlib/reals.c
parentc5878cced02fd1ed7e7940eaf8eb8b4cce23a9d4 (diff)
Fix parens parsing and hook up sqrt
Diffstat (limited to 'src/stdlib/reals.c')
-rw-r--r--src/stdlib/reals.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/reals.c b/src/stdlib/reals.c
index 40f4cf4c..aee39414 100644
--- a/src/stdlib/reals.c
+++ b/src/stdlib/reals.c
@@ -240,7 +240,7 @@ Real_t Real$divided_by(Real_t x, Real_t y) {
}
static Int_t Real$compute_sqrt(Real_t r, int64_t decimals) {
- Real_t operand = &r->userdata.children[0];
+ Real_t operand = r->userdata.children;
double d = Real$as_float64(operand);
// TODO: newton's method to iterate
return Int$from_float64(sqrt(d) * pow(10.0, (double)decimals), true);