> From: Xaq > > I while back I posted a question about a simple math problem, that everyone > was very helpful in solving. I hope you guys can help me with this one, it > is a little harder. > > I need to solve this equation: > > sqrt(x^2+y^2)/(x*y) > > Both x, y, and the answer are all byte(0-255) values. > > [cut] That's easy: if x or y are zero, return 255 (nearest thing to infinity). if x == 1 or y == 1, return 1 (nearest thing to sqrt(x^2+1)/x). else return 0 (nearest thing to any other case). But seriously! I presume you want to scale the result to a meaningful precision? Regards, SJH