You're absolutely right christop, the sqrtf function is available in C99 according to cppreference.com: sqrt, sqrtf, sqrtl - cppreference.com. I should have looked there before making any assumptions...
Type: Posts; User: Inarrebla
You're absolutely right christop, the sqrtf function is available in C99 according to cppreference.com: sqrt, sqrtf, sqrtl - cppreference.com. I should have looked there before making any assumptions...
It doesn't work either:
$ gcc -std=gnu99 -lmath -o test test.c
test.c: In function 'main':
test.c:7:17: warning: implicit declaration of function 'sqrtf' [-Wimplicit-function-declaration]
...
Hello,
I wrote a C program that relies on the sqrtf function to calculate the square root of a float, so I check if the macro _POSIX_C_SOURCE is defined before including any header. The problem is...