NetBSD Problem Report #75

From gnats  Thu Jan 13 12:50:36 1994
Received: from forte (forte.mathematik.uni-Bremen.de [134.102.232.1]) by sun-lamp.cs.berkeley.edu (8.6.4/8.6.4) with ESMTP id MAA24901 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Thu, 13 Jan 1994 12:42:28 -0800
Message-Id: <199401132041.VAA09409@forte>
Date: Thu, 13 Jan 1994 21:41:22 +0100
From: thomas@mathematik.uni-Bremen.de
Reply-To: thomas@mathematik.uni-Bremen.de
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: libm/common_source/pow.c doesn't compile under -O2
X-Send-Pr-Version: 3.01.6

>Number:         75
>Category:       lib
>Synopsis:       libm/common_source/pow.c doesn't compile under -O2
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    jtc
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 13 13:05:08 +0000 1994
>Closed-Date:    Tue Jan 25 11:47:46 +0000 1994
>Last-Modified:  Thu Jan 02 18:14:07 +0000 2014
>Originator:     Thomas Eberhardt
>Release:        
>Organization:
CeVis, University of Bremen, Germany
>Environment:

System: NetBSD ed209 0.9a ED209#0 i386

Machine: i386
>Description:
	libm/common_source/pow.c doesn't compile under -O2 since the
	compiler tries to evaluate the huge*huge expression and
	aborts with an floating point error message.
>How-To-Repeat:

>Fix:
*** pow.c-	Fri Dec 17 07:30:57 1993
--- pow.c	Thu Jan  6 12:24:03 1994
***************
*** 121,126 ****
--- 121,127 ----
  #endif		/* vax or tahoe */

  const static double zero=0.0, one=1.0, two=2.0, negone= -1.0;
+ const static double huge=1e300, tiny=1e-300;

  static double pow_P __P((double, double));

***************
*** 175,181 ****
  #endif
  {
  	struct Double s, t, log__D();
! 	double  exp__D(), huge = 1e300, tiny = 1e-300;

  	if (x == zero)
  		if (y > zero)
--- 176,182 ----
  #endif
  {
  	struct Double s, t, log__D();
! 	double  exp__D();

  	if (x == zero)
  		if (y > zero)
>Release-Note:
>Audit-Trail:

State-Changed-From-To: open->analyzed
State-Changed-By: jtc
State-Changed-When: Fri Jan 14 15:02:50 1994
State-Changed-Why:
Have to check to see if bug still occurs when Floating Point exception mask
is corrected.  If it doesn't, this fix is unecessary; if it does, this fix
looks reasonable.

Responsible-Changed-From-To: gnats-admin->jtc
Responsible-Changed-By: jtc
Responsible-Changed-When: Fri Jan 14 15:04:49 1994
Responsible-Changed-Why:
I'll take responsibilty for seeing if this fix is needed, and applying it
if it does.

State-Changed-From-To: analyzed->closed
State-Changed-By: jtc
State-Changed-When: Tue Jan 25 11:47:46 1994
State-Changed-Why:
Changing the FPU exception mask fixed this bug.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.