I don't think there is a built-in mechanism in Cocoa for the rational numbers (there is one for decimal numbers).
Your problem is a very difficult mathematic problem in the general case. For example, is 0.3333… to be represented as 1/3 or 33333…/100000… ?
If you want to represent only decimal numbers as fraction, it's recommended to use the subclass NSDecimalNumber (you can specify the rouding mode, the rouding scale, …), and you'll have to write a specific Formatter.
If you want to represent any rational number as a fraction, you may create a NSNumber subclass to maange the numerator and denominator.