tan return infinity? At what value?
pi/2 does not return infinity (probably due to errors).
tan cannot return infinity (
From a note on
tan description in cppreference :
The function has poles at
x = π(1/2 + n), however existing implementations of floating point numbers cannot accurately represent π / 2, so the argument never hits a pole.