fraction in objective-c