Brian Dunning's FileMaker Custom Functions

DecimalToFraction [Decimal ; MaxDemominator]

Transforms a decimal number to a fractional one using a While statement.

  Average rating: 4.0 (2 votes) Log in to vote

Mark D Kerr   Mark D Kerr - Show more from this author
Discovery Reef Design & Consulting

Share on Facebook Share on Twitter

  Sample input:
DecimalToFraction ( 3.812 ; 64 )
  Sample output:
3-13/16

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

An updated approach to an old task, uses a While statement to loop through a range of denominators, delivering the nearest match to convert the decimal number. Correctly rounds those odd decimal numbers for 32nd, 64th and higher denominators.

 

Comments

Brian Dunning   Brian Dunning, BrianDunning.com
Apr 7, 2020
It's important to point out that I loved the program I had for this on my HP calculators in the early 1980s
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: