Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* add this to a header or at the top of the source-code */
- #include <math.h>
- static typeof(&sqrt) sqrt_wrap = sqrt;
- #define sqrt(f) _Generic((f), int: sqrt_wrap(f), double: sqrt_wrap(f))
- #define sqrt(f) _Generic((f), int: sqrt(f), double: sqrt(f))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement