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