A function to convert a decimal to a fraction and result (returned as a string) should be calculated with LCM (least common multiple) in mind, example:
0.75 = 3/4 and not 75/100
1.3 = 1 1/3
The function will be used to convert weights (mg, g, kg) and capacities (ml, cl, l) for recipes, therefore there could be up to 3 numbers after the decimal point.
Furthermore, one asks why is 1.3 = 1 1/3 instead of 1 3/10. The answer is that in many recipes, you see 1/3 cup (easy to understand) instead of 3/10 cup (more accurate).
and that the function returns, fractions by:
#/2, #/3, #/4, #/5, etc... that is, the most common fractions possible which a user can easily interpret!!!
It should return the first fraction possible, because #/2 is easier to interpret than #/5 for most users.
I would appreciate a working demo showing off the conversion function. I've received my bids with demos ripped off Google searches and not even one does the job.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
VB6