You obviously can't treat it as one number, so treat it as a set of numbers with a separator. Then, you can use componentsSeparatedByString:@"."
and process each of the numbers separately.
Be sure to check the count of the components. If one number has more components than the other you should fall back to default values (0
) if you haven't already got a result from the algorithm.
Loop over the components and compare each part.