Express D
as a fraction.
D
D
can be represented as follows.
= 0 + fraction( D.substr( 2, 1 ) , 10 ) + fraction( D.substr( 3, 1 ) , 100 ) + fraction( D.substr( 4, 1 ), 1000 ) + fraction( D.substr( 5, 1 ), 10000 )
= fraction( NUMERATOR, 10000 )
You can also skip a few steps by making a fraction with NUMERATOR
as the numerator and 10000
(because the decimal extends to the ten thousandths place) as the denominator.
fraction( NUMERATOR, 10000 )
Express FIXED
as a mixed number. Reduce to lowest terms.
W + D
FIXED
can be represented as follows:
= W + fraction( floor( D * 10 ), 10 ) + fraction( floor( ( D * 100 ) % 10 ), 100 )
= W + fraction( roundTo( 0, D * 100 ), 100 )
Reduce the fractional part by dividing the numerator and denominator by GCD
.
=W + fractionReduce( round( D * 100 ) , 100 )