🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Peter W. Flur Tue, 14 Apr 1992 14:02
Re: gcc compiler bug ?
#390
Author: Peter W. Flur
Date: Tue, 14 Apr 1992 14:02
47 lines
1771 bytes
|->  From osborn@eecom.gatech.edu Tue Apr 14 09:00:15 1992
|->  Return-Path: <osborn@eecom.gatech.edu>
|->  Date: Tue, 14 Apr 1992 09:00:13 -0500
|->  To: help@eecom
|->  From: osborn@eecom.gatech.edu
|->  Subject: gcc compiler bug ?
|->  
|->  
|->  There appears to be a bug in the gcc compiler on the hp's.  (I have not
|->  tried the suns yet.)
|->  
|->  The following program shows that the absolute value function (fabs) does
|->  not except double precision variables, as the man pages indicate.
|->  
|->  #include <math.h>
|->  
|->  main(ac,av)
|->  int ac;
|->  char *av[];
|->  {
|->  
|->  double a,b;
|->  
|->  a = 1.7;
|->  b = 0.5;
|->  printf("x = %g\n",fabs(a-b));
|->  printf("x = %g\n",fabs((a-b)));
|->  printf("x = %g\n",fabs((double)(a-b)));
|->  printf("x = %g\n",fabs((float)(a-b)));
|->  printf("x = %g\n",fabs(a*b));
|->  }
|->  
|->  Who should this bug be reported to ??  
|->  
|->  Allan Osborn
|->  
|->  

Yup, looks like you may have a bug.  I'll forward this on to the people
at FSF.

Peter
-----------------------------------------------------------------------
     Peter Flur, Research Engineer - School of EE, Georgia Tech
       E-MAIL: Peter.Flur@ee.gatech.edu PHONE: (404) 853-9355
     DUKE UNIVERSITY -- 1991 & 1992 NCAA BASKETBALL CHAMPIONS!!!
            The Duke Dynasty Rolls  --- ThreePeat '93
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads