In addition to verifying the syntax of the fractional component of a MilesianString, the MilesianFraction class can convert the fractional component of a MilesianString to both String representations and to floating point values.
The MilesianFraction class provides a method expressing the fraction as a String transcribing the sum of unit fractions. Individual unit fractions are expressed as 1 /denominator
, where denominator
is an integer; series of unit fractions are joined by the string +
.
In converting MilesianFractions to decimal values, the default is to round the value to three decimal places, but the degree of precission may be explicitly defined.
The fraction 5/6 can be expressed in Milesian notation as β γ". Its String representation is 1/2 + 1/3.
The above expresion for 2/3 can be converted to the decimal value 0.833.
Rounded to 2 places, this is 0.83.