Path: utzoo!telly!philmtl!uunet!aplcen!uakari.primate.wisc.edu!brutus.cs.uiuc.edu!psuvax1!rutgers!netnews.upenn.edu!cps3xx!tank!phd_ivo@gsbacd.uchicago.edu From: phd_ivo@gsbacd.uchicago.edu Newsgroups: gnu.gcc Subject: IEEE FLP question: Use of NAN and Inf Message-ID: <6788@tank.uchicago.edu> Date: 18 Dec 89 22:59:10 GMT Sender: news@tank.uchicago.edu Lines: 25 ****************************************** Can someone please tell me how to use the NAN definition in math.h? double d; d=(double) NAN; printf("%d", d==(double) NAN); prints 0 in NeXT version 16 (Gnu version 1.34). What am I doing wrong? Moreover, can someone please tell me how to define the IEEE double's of +Inf, -Inf, and NaN, so that I can assign and test for them? Will standard operations like + or - generate an exception if attempted on NaN? That would be useful for debugging. Help is appreciated. /ivo