public static SimpleFraction buildFractionExactDenominator(double val, int exactDenom){int num =  (int)Math.round(val*exactDenom);return new SimpleFraction(num,exactDenom);}

public static SimpleFraction BuildFractionExactDenominator(double val, int exactDenom){int num = (int)Math.Round(val * (double)exactDenom, MidpointRounding.AwayFromZero);return new SimpleFraction(num, exactDenom);}
