Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: norm AT dad DOT org Message-Id: <200201150045.QAA04280@dad.dad.org> cc: cygwin AT cygwin DOT com, "Steven C. Bankes" , "Steven C. Bankes" , "Nathaniel Anagnostou" Subject: Re: Need help Accessing a NAN In-reply-to: Your message of "Mon, 14 Jan 2002 10:14:14 PST." <200201141814 DOT KAA21325 AT dad DOT dad DOT org> Reply-To: norm AT dad DOT org cc: norm AT dad DOT org Date: Mon, 14 Jan 2002 16:45:36 -0800 norm AT dad DOT dad DOT org writes: >Under Linux I do: > >include >... >reciprocal=NAN; > > >When I try to compile this under cygwin, gcc complains that NAN is undefined. > >Under cygwin, "man nan", tells me about a function named nan(), also using math.h. >When I try to use it, gcc complains about an implicit declaration of nan(). I solved this problem myself. Albeit very inelegantly inline double nan() { # ifdef NAN return NAN; #else double x=0.0; return 0/x; #endif } Norman Shapiro 798 Barron Avenue Palo Alto CA 94306-3109 (650) 565-8215 norm AT dad DOT org -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/