# Fraction ( number )

Returns a number as fraction text.

Average rating: 4.5 (29 votes) Log in to vote

Theo Ros * http://notapplicable.com |

Sample input:

Fraction ( 5.54 )

Sample output:

"5 27/50"

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

Returns the number as fraction.

i.e. Fraction ( 5,54 ) --> "5 27/50"

( above uses Dutch syntax ( decimal COMMA's) )

Return type: Text

Uses GCF() function by Scott Morrison

## Comments

Don Rossi, Lancaster, PA Apr 26, 2011 |
||

This function is incorrect for decimals less than ".1". Try .0625. The significant zero is purged. It should be: d = 10 ^ (Length (b) - 2) I think |
||

Thomas Bilski, Antidote Solutions Sep 11, 2018 |
||

I tested Don's edit and it works. The function above does not work properly with .0625. | ||

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