I was just surfing around on the devshed forums. I saw this thread on rounding a long number like 14 decimal places to 5 decimal places. Now I thought these were some very good forums.....Until I saw this post on the forums by a member with over 1200 posts.
http://forums.devshed.com/net-development-87/rounding-numbers-516885.html
His steps to rounding are:
1. Multiply by whatever power of 10 so that your desired least-significant-digit is in the 1s place
2. Add 0.5
3. Truncate to an integer
4. Convert back to the same type and divide by the same power of 10:
then his footnote:
"The only problem is you're using floating point.
You may end up with some calculation errors that come with floating
point territory."
I would love to see some of his production code.