As others have pointed out, this is a very broad question - what works well for software might be a poor choice for a hardware implementation; and then there are issues of correct rounding for IEEE-754, hardware lookup tables, etc. There are a lot of open source C libs, with libm implementations as well. A good overview of classic and modern methods can be found here.