From 8145ba753df183f0d48cd6e9cc5a01b215eb31dc Mon Sep 17 00:00:00 2001 From: Julian Weigt Date: Fri, 16 Jan 2026 13:41:52 +0100 Subject: Properly use header files and change return type for conversion from bool to int. --- double.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'double.c') 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 #include #include @@ -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; } -- cgit v1.2.3