From 3cff2acc8eec95183fe4cd3dcc3a3bf30b37ce66 Mon Sep 17 00:00:00 2001 From: Julian Weigt Date: Sun, 28 Dec 2025 15:40:34 +0000 Subject: Add root_to_string function to enable printing of roots. --- double.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'double.c') diff --git a/double.c b/double.c index cf4796c..f86a586 100644 --- a/double.c +++ b/double.c @@ -31,3 +31,8 @@ bool to_string(char* s, double d){ sprintf(s,"%f",d); return true; } + +bool root_to_string(char* s, double d, double p){ + to_string(s,pow(d,1/p)); + return true; +} -- cgit v1.2.3