If you wanna use my version instead of the version included in the math.h library, here's what you need to do:
- Add the sqrt.c and sqrt.h files to your project directory.
- Add the line #include "sqrt.h" at the top of the file that requires the sqrt function.
- Compile your program.
CC := gcc
CFLAGS := -g -Wall -Werror
sqrt.out: main.o sqrt.o
$(CC) $(CFLAGS) main.o sqrt.o -o sqrt.out
main.o: main.c sqrt.h
sqrt.o: sqrt.c