I wrote this test code:
NSLog(@"%g", tan(M_PI / 2.0));
and the output of the console is:
1.63312e+16
The issues is about approximation, right? Did I make some mistakes or the tan function of math.h really doesn't handle this case itself (returning me INFINITY) ? shall I handle theese input cases myself (example: when I get pi/2 input value I return an error message) or is there a better (more elegant) way to get the correct value ?
Thanks