Hacker News new | ask | show | jobs
by schwa 5287 days ago
For xplatform development on OSX & iOS tgmath OS great.

In fact clang recently added an extension to c for function overloading in a clean way.

1 comments

How often do you really need to make sure you get the float versions rather than simply using the double versions everywhere and dealing with the minor speed hit? The tgmath stuff is really for scientific computing. For simple trigonometry on UI elements and such, there's no noticeable advantage to using e.g. cosf rather than plain cos and letting conversions happen.