summaryrefslogtreecommitdiff
path: root/double.c
diff options
context:
space:
mode:
Diffstat (limited to 'double.c')
-rw-r--r--double.c5
1 files changed, 5 insertions, 0 deletions
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;
+}