From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10164 invoked by alias); 3 May 2005 09:49:19 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 9822 invoked by uid 48); 3 May 2005 09:49:01 -0000 Date: Tue, 03 May 2005 09:49:00 -0000 Message-ID: <20050503094901.9821.qmail@sourceware.org> From: "ebotcazou at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050213054900.19933.casevh@comcast.net> References: <20050213054900.19933.casevh@comcast.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/19933] Problem with define of HUGE_VAL in math_c99. X-Bugzilla-Reason: CC X-SW-Source: 2005-05/txt/msg00387.txt.bz2 List-Id: ------- Additional Comments From ebotcazou at gcc dot gnu dot org 2005-05-03 09:48 ------- > I'm not sure what is best done with the signbit definition (maybe nothing if > it will never call a library function at present, even though it isn't > properly type-generic); We can discriminate using sizeof, like in glibc. > but the others can be done, e.g. > > #define isfinite(x) __extension__ ({ __typeof (x) __x = (x); __builtin_expect (!isnan(__x - __x), 1); }) This works fine for "big" numbers, but are there similar tricks to distinguish denormals from normals? If no, we'll have to resort to FLT_MIN and the like or to bitwise-testing the exponent against 0. I'm going to attach a first version of math_c99.h. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19933