This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/14621] libm tan failure for pi/2 argument
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Mar 2004 14:54:16 -0000
- Subject: [Bug c/14621] libm tan failure for pi/2 argument
- References: <20040317202427.14621.gerald.evenden@verizon.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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