I am trying to find the correct domain for the tan
function, I know that
tan x = sinx / cos x
and tan
is undefined when cos x = 0
. So
I am trying to check if cos x
is 0.
if ( Math.Cos(x).Equals(0) )
{
// do stuff
}
But this is never true because Math.Cos returns 6.123....E-17
How o check for cos == 0 ?