Description
DollarFR takes a decimal number and returns a number representing a fraction.
Arguments
decimalNumber is a number representing the actual decimal value that is to be converted.
fractionBase is a positive number which, truncated, specifies the base of the fraction that is to be created.
Returns
Number value which represents a fraction.
Action
DollarFR takes a decimal number and returns a number representing a fraction. See the example below for how numbers are represented in fractional form.
Examples
DollarFR(1.125,8)
Returns 1.1. This is interpreted as 1 and 1/8. The decimal portion of the fraction is taken to be the numerator for the fraction base.
DollarFR(1.2,8)
Returns 1.16. This is interpreted as 1 and 1.6/8. The decimal portion is the numerator. Note that this is not interpreted as 16/8.
DollarFR(1.8125,16)
Returns 1.13. This is interpreted as 1 and 13/16.
Comments
This function is designed to work like the Excel function of the same name.