Apple's Open Source project is a great resource for finding source code to use in your own projects. I've found many useful libraries and functions by browsing Apple's open source code - and I know they've been pretty-well vetted since they are deployed on OS X and iOS. All around, Apple Open Source is a very useful resource for developers bringing up a new system.
Today I'd like to highlight Apple's
libm implementation. This is a great resource for those who need math library functions on their platforms.
I usually wait until I need to implement some mathy things on my system before I worry about porting
libm. Once I know what functionality I need, I import the specific functions into my project (usually with no changes). You can also just build the entire library and let the linker take out unneeded code for you.