Advertisement
Guest User

Untitled

a guest
Sep 16th, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. /* add this to a header or at the top of the source-code */
  2. #include <math.h>
  3. static typeof(&sqrt) sqrt_wrap = sqrt;
  4. #define sqrt(f) _Generic((f), int: sqrt_wrap(f), double: sqrt_wrap(f))
  5.  
  6. #define sqrt(f) _Generic((f), int: sqrt(f), double: sqrt(f))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement