User Portlet User Portlet

Discussions
I am looking for an algorithm to convert very long decimal fractions to binary fractions, preferably starting with the most significant digits and working my way down.  Can anybody help?