summaryrefslogtreecommitdiff
path: root/double.c
diff options
context:
space:
mode:
Diffstat (limited to 'double.c')
-rw-r--r--double.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/double.c b/double.c
index 1ad289f..9081ebb 100644
--- a/double.c
+++ b/double.c
@@ -1,3 +1,4 @@
+#include "double.h"
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
@@ -30,12 +31,12 @@ double power(double d, double p) { return pow(d,p); }
double to_double(double d){ return d; }
-bool to_string(char* s, double d){
+int to_string(char* s, double d){
sprintf(s,"%f",d);
- return true;
+ return 0;
}
-bool root_to_string(char* s, double d, double p){
+int root_to_string(char* s, double d, double p){
to_string(s,pow(d,1/p));
- return true;
+ return 0;
}