[Bug c/14621] libm tan failure for pi/2 argument
giovannibajo at libero dot it
gcc-bugzilla@gcc.gnu.org
Thu Mar 18 14:54:00 GMT 2004
------- Additional Comments From giovannibajo at libero dot it 2004-03-18 14:54 -------
Gerald,
you are totally missing the point, I'm sorry. Looking at your original report:
>#include <math.h>
>c=tan(M_PI_2)
>fails to giver error for out of range argument.
GCC implements the C89 or C99 standard, and there is no mention of out-of-range
errors for this call, unless we are all blind and you show us where it is.
> No error number nor invalid return value.
This is what the C standard says.
> Answer should be infinite.
Wrong again, because M_PI_2 is not the mathematically-exact pi/2, so the answer
has to be just a very big number, as it is. In the C standard there is also no
mention that the compiler or the library should treat M_PI_2 as a special
identifier referring to the exact value of pi/2.
By all means, we are following exactly the C89 and C99 standard. This bug
report is invalid, and we are closing it for the last time. If *ANYTHING* else,
it is not related to GCC proper. I urge you to not open this again unless you
bring new evidence, thanks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14621
More information about the Gcc-bugs
mailing list