From f07c07e551b89b66b14936ae4573e656fbd7afb6 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 16 Dec 2025 23:31:06 -0500 Subject: Fix parens parsing and hook up sqrt --- src/stdlib/reals.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stdlib/reals.c') 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); -- cgit v1.2.3