[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::axp-developer

Title:Alpha Developer Support
Notice:[email protected], 800-332-4786
Moderator:HYDRA::SYSTEM
Created:Mon Jun 06 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3722
Total number of notes:11359

3433.0. "visix" by HYDRA::AXPDEVELOPER (Alpha Developer support) Thu Apr 03 1997 03:02

    Company Name :  visix
    Contact Name :  Shawn Carnell
    Phone        :  
    Fax          :  
    Email        :  [email protected]
    Date/Time in :   3-APR-1997 02:01:47
    Entered by   :  Ian Chamberlin
    SPE center   :  REO

    Category     :  unix
    OS Version   :  
    System H/W   :  


    Brief Description of Problem:
    -----------------------------

From:	SMTP%"[email protected]"  2-APR-1997 17:23:56.40
To:	[email protected]
CC:	
Subj:	HUGH_VAL and -ieee

Return-Path: [email protected]
Received: by asimov.mro.dec.com (UCX V4.1-12, OpenVMS V6.2 VAX);
	Wed, 2 Apr 1997 17:23:54 -0500
Received: from pobox1.pa.dec.com by fluid.mro.dec.com (5.65v4.0/1.1.8.2/19Nov96-0448PM)
	id AA26048; Wed, 2 Apr 1997 17:24:04 -0500
Received: by pobox1.pa.dec.com; id AA14054; Wed, 2 Apr 97 14:24:02 -0800
Received: from shelby-102.visix.com by mail2.digital.com (5.65 EXP 4/12/95 for V3.2/1.0/WV)
	id AA09381; Wed, 2 Apr 1997 14:15:01 -0800
Received: from boss429.visix.com (boss429.visix.com [149.62.105.9]) by shelby.visix.com (8.6.12/8.6.12) with SMTP id QAA09672 for <[email protected]>; Wed, 2 Apr 1997 16:17:53 -0500
Received: by boss429.visix.com (5.65v3.2/1.1.10.5/03Apr96-1225AM)
	id AA03344; Wed, 2 Apr 1997 16:14:24 -0500
Date: Wed, 2 Apr 1997 16:14:24 -0500
Message-Id: <[email protected]>
From: Shawn Carnell <[email protected]>
To: [email protected]
Subject: HUGH_VAL and -ieee
Reply-To: [email protected]
Mime-Version: 1.0 (generated by tm-edit 7.100)
Content-Type: text/plain; charset=US-ASCII

Customer Code:  586962

Folks,

I'm using DEC C V5.2-033 on Digital UNIX V4.0 (Rev. 564).

Given this program:

#include <stdlib.h>
#include <math.h>

int main (int argc, char **argv)
{
  double	foo;

  foo = HUGE_VAL;

  return 0;
}

If i compile without the -ieee flag, all is well.  If i compile with
-ieee, i get the following warning:

cc: Warning: foo.c, line 8: In this statement, a floating point error occurs in evaluating the expression "1.8e308".
  foo = HUGE_VAL;
--------^

Please pardon my ignorance.  I've read the man pages but i'm still not
sure what action i should take to avoid this warning (i want to use
-ieee).

Thanks!
Shawn

From:	SMTP%"[email protected]"  2-APR-1997 17:23:56.40
To:	[email protected]
CC:	
Subj:	HUGH_VAL and -ieee

Return-Path: [email protected]
Received: by asimov.mro.dec.com (UCX V4.1-12, OpenVMS V6.2 VAX);
	Wed, 2 Apr 1997 17:23:54 -0500
Received: from pobox1.pa.dec.com by fluid.mro.dec.com (5.65v4.0/1.1.8.2/19Nov96-0448PM)
	id AA26048; Wed, 2 Apr 1997 17:24:04 -0500
Received: by pobox1.pa.dec.com; id AA14054; Wed, 2 Apr 97 14:24:02 -0800
Received: from shelby-102.visix.com by mail2.digital.com (5.65 EXP 4/12/95 for V3.2/1.0/WV)
	id AA09381; Wed, 2 Apr 1997 14:15:01 -0800
Received: from boss429.visix.com (boss429.visix.com [149.62.105.9]) by shelby.visix.com (8.6.12/8.6.12) with SMTP id QAA09672 for <[email protected]>; Wed, 2 Apr 1997 16:17:53 -0500
Received: by boss429.visix.com (5.65v3.2/1.1.10.5/03Apr96-1225AM)
	id AA03344; Wed, 2 Apr 1997 16:14:24 -0500
Date: Wed, 2 Apr 1997 16:14:24 -0500
Message-Id: <[email protected]>
From: Shawn Carnell <[email protected]>
To: [email protected]
Subject: HUGH_VAL and -ieee
Reply-To: [email protected]
Mime-Version: 1.0 (generated by tm-edit 7.100)
Content-Type: text/plain; charset=US-ASCII

Customer Code:  586962

Folks,

I'm using DEC C V5.2-033 on Digital UNIX V4.0 (Rev. 564).

Given this program:

#include <stdlib.h>
#include <math.h>

int main (int argc, char **argv)
{
  double	foo;

  foo = HUGE_VAL;

  return 0;
}

If i compile without the -ieee flag, all is well.  If i compile with
-ieee, i get the following warning:

cc: Warning: foo.c, line 8: In this statement, a floating point error occurs in evaluating the expression "1.8e308".
  foo = HUGE_VAL;
--------^

Please pardon my ignorance.  I've read the man pages but i'm still not
sure what action i should take to avoid this warning (i want to use
-ieee).

Thanks!
Shawn
T.RTitleUserPersonal
Name
DateLines
3433.1with -ieee, HUGE_VAL is +infinityHYDRA::NEWMANChuck Newman, 508/467-5499 (DTN 297), MRO1-3/F26Thu Apr 03 1997 10:508
When compiled with -ieee, HUGE_VAL is +infinity (0x7ff0000000000000)

The compiler does the assignment correctly, but issues a warning that the
value isn't a valid number.

If they want the largest valid number, use DBL_MAX instead of HUGE_VAL

								-- Chuck Newman
3433.2asap membership #HYDRA::SHENThu Apr 03 1997 12:2156
    From:   SMTP%"[email protected]"
    To:     [email protected] ([email protected])
    CC:
    Subj:   Re: HUGH_VAL and -ieee
    
    Return-Path: [email protected]
    Received: by vaxsim.mro.dec.com (UCX V4.1-12, OpenVMS V6.2 VAX);
            Thu, 3 Apr 1997 10:03:00 -0500
    Received: from shelby.visix.com by mail12.digital.com (8.7.5/UNX
    1.5/1.0/WV)
            id JAA29691; Thu, 3 Apr 1997 09:58:35 -0500 (EST)
    Received: from boss429.visix.com (boss429.visix.com [149.62.105.9]) by
    shelby.vi
    six.com (8.6.12/8.6.12) with SMTP id JAA07140 for
    <[email protected]
    m>; Thu, 3 Apr 1997 09:43:24 -0500
    Received: by boss429.visix.com (5.65v3.2/1.1.10.5/03Apr96-1225AM)
            id AA17328; Thu, 3 Apr 1997 09:41:34 -0500
    Date: Thu, 3 Apr 1997 09:41:34 -0500
    Message-Id: <[email protected]>
    From: Shawn Carnell <[email protected]>
    To: [email protected] ([email protected])
    Subject: Re: HUGH_VAL and -ieee
    In-Reply-To: <[email protected]>
    References: <[email protected]>
    Reply-To: [email protected]
    Mime-Version: 1.0 (generated by tm-edit 7.100)
    Content-Type: text/plain; charset=US-ASCII
    
    [email protected] writes:
     | Shawn,
     | 
     | Thank you for your inquiry.
     | 
     | I have passed your inquiry onto one of our engineers who shoul be
    contacting 
    you 
     | shortly.
     | 
     | However, I cannot find you as a ASAP member under your customer no
    586962, Yo
    ur 
     | company Visix or your name. My list is a bit out of date but can you
    confirm 
     | that you are an ASAP member.
    
    We are indeed members.  That's the right number according to my
    "Association of Software & Application Partners Program, How to Use
    our Services" sheet.  I just used the same number for an e-mail
    support request about 1 week ago.  Our membership should run through
    December of 1997.
    
    Is there some additional information i can give you?
    
    Shawn
    
3433.3use DBL_MAXRDGENG::CHAMBERLINDanger! Do not Reverse PolarityMon Apr 07 1997 05:5119
(Sent on 3rd April)

Shawn,

	When compiled with -ieee, HUGE_VAL is +infinity (0x7ff0000000000000)

The compiler does the assignment correctly, but issues a warning that the
value isn't a valid number.

If you want the largest valid number, use DBL_MAX instead of HUGE_VAL (need to
include <limits.h>)

regards,

		

Ian Chamberlin,

Digital Equipment Co, Software Partner Engineering.