Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Mon, 27 Jun 2005 09:43:19 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: newlib@sources.redhat.com
Cc: cygwin@cygwin.com
Subject: Re: HUGE is missing in math.h
Message-ID: <20050627074319.GA383@calimero.vinschen.de>
Reply-To: newlib@sources.redhat.com
Mail-Followup-To: newlib@sources.redhat.com, cygwin@cygwin.com
References: <83d0063b0506260937400a44d3@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <83d0063b0506260937400a44d3@mail.gmail.com>
User-Agent: Mutt/1.4.2i

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.

Since math.h is part of newlib, I've redirect this posting to the
newlib mailing list.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin@cygwin.com
Red Hat, Inc.

--
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/

