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 Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Tue, 28 Jun 2005 08:55:52 -0700 From: Yitzchak Scott-Thoennes To: cygwin AT cygwin DOT com Subject: Re: HUGE is missing in math.h Message-ID: <20050628155552.GA2792@efn.org> References: <83d0063b0506260937400a44d3 AT mail DOT gmail DOT com> <20050627074319 DOT GA383 AT calimero DOT vinschen DOT de> <42C06EAE DOT 60207 AT redhat DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42C06EAE.60207@redhat.com> User-Agent: Mutt/1.4.2.1i X-IsSubscribed: yes On Mon, Jun 27, 2005 at 05:25:02PM -0400, Jeff Johnston wrote: > Corinna Vinschen wrote: > >On Jun 26 09:37, Humberto Bortolossi wrote: > > > >>Hi! > >> > >>I'm trying to port a C program written originally in > >>Linux to the Microsoft Windows plataform. > >> > >>I've realized that math.h under cygwin doesn't > >>define the macro HUGE, that is defined in > >>the math.h under linux: > >> > >>/* Declarations for math functions. > >> Copyright (C) 1991-1993,1995-1999,2001,2002 Free Software Foundation, > >> Inc. > >> This file is part of the GNU C Library. > >>*/ > >>/* SVID mode specifies returning this large value instead of infinity. */ > >># define HUGE 3.40282347e+38F > >> > >>I thought math.h should be quite portable ... > > > > > >HUGE is not portable. It's not defined in the standard, see > >http://www.opengroup.org/onlinepubs/009695399/basedefs/math.h.html > >Use HUGE_VAL instead. > > > >However, other definitions are missing in math.h, like HUGE_VALF, > >HUGE_VALL, INFINITY and NAN. > > > > I'll take a look at adding these unless you want to. HUGE_VALL is the > only one that is difficult. How are you planning on the others? 1.18973149535723176506e+4932L makes a nice long double +infinity for me. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/