randRange( 0, 1 ) ? randRange( 100, 999 ) : randRange( 1000, 9999 ) ( NUMERATOR / 10000 ).toFixed( 4 ) getGCD( round( D * 10000 ) , 10000 )

Express D as a fraction. Reduce to lowest terms.

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 )

Then, reduce the fractional part by dividing the numerator and denominator by GCD.

=fractionReduce( round( D * 10000 ) , 10000 )

randRange( 1, 19 ) randRangeExclude(1, 99, [ 10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 , 90 ]) / 100 getGCD( round( D * 100 ) , 100 ) ( W + D ).toFixed( 2 )

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 )