View Issue Details

IDProjectCategoryView StatusLast Update
00001481003.1(2008)/Issue 7System Interfacespublic2013-04-16 13:06
Reporterdrepper Assigned Toajosey  
PrioritynormalSeverityObjectionTypeClarification Requested
Status ClosedResolutionAccepted As Marked 
NameUlrich Drepper
OrganizationRed Hat, Inc.
User Referenceud-pow-pole
Sectionpow
Page Number1518
Line Number49005-49008
Interp Status---
Final Accepted Text0000148:0000225
Summary0000148: unclear return value description
DescriptionThe pow man page currently says:

  On systems that support the IEC 60559 Floating-Point option, a pole error
  shall occur and pow(), powf(), and powl() shall return ±HUGE_VAL, ±HUGE_VALF,
  and ±HUGE_VALL, respectively if y is an odd integer, or HUGE_VAL, HUGE_VALF,
  and HUGE_VALL, respectively if y is not an odd integer.

The problem is that it is not described when the + or - in case of odd integers is used. In fact, I think the + is wrong.
Desired ActionReplace in the above paragraph

   ±HUGE_VAL, ±HUGE_VALF, and ±HUGE_VALL

with

   -HUGE_VAL, -HUGE_VALF, and -HUGE_VALL
Tagsc99, tc1-2008

Activities

geoffclare

2009-09-15 08:36

manager   bugnote:0000225

The suggested change would create a conflict with the C Standard.

C99 (n1256) says in F.9.4.4:

-- pow(±0, y) returns ±inf and raises the ``divide-by-zero''
   floating-point exception for y an odd integer < 0.
-- pow(±0, y) returns +inf and raises the ``divide-by-zero''
   floating-point exception for y < 0 and not an odd integer.

Note that "pow(±0, y) returns ±inf" is shorthand for "pow(+0, y)
returns +inf and pow(-0, y) returns -inf". (See F.9 para 12).

These requirements in C99 seem right to me.

POSIX doesn't quite match C99, in that it just says "zero" instead
of "±0". I think we should change:

"On systems that support the IEC 60559 Floating-Point option, a
pole error shall occur ..."

to:

"On systems that support the IEC 60559 Floating-Point option, if
x is ±0, a pole error shall occur ..."

drepper

2009-09-15 14:52

reporter   bugnote:0000226

I agree with Geoff's change, that's what's missing. The ± in the new text is the anchor for the ± in the rest of the sentence. Without this change there are problems.

Issue History

Date Modified Username Field Change
2009-09-14 23:28 drepper New Issue
2009-09-14 23:28 drepper Status New => Under Review
2009-09-14 23:28 drepper Assigned To => ajosey
2009-09-14 23:28 drepper Name => Ulrich Drepper
2009-09-14 23:28 drepper Organization => Red Hat, Inc.
2009-09-14 23:28 drepper User Reference => ud-pow-pole
2009-09-14 23:28 drepper Section => pow
2009-09-14 23:28 drepper Page Number => 1518
2009-09-14 23:28 drepper Line Number => 49005-49008
2009-09-15 08:36 geoffclare Note Added: 0000225
2009-09-15 14:52 drepper Note Added: 0000226
2009-09-17 00:43 nick Tag Attached: c99
2009-09-24 15:42 msbrown Interp Status => ---
2009-09-24 15:42 msbrown Final Accepted Text => 0000148:0000225
2009-09-24 15:42 msbrown Status Under Review => Resolved
2009-09-24 15:42 msbrown Resolution Open => Accepted As Marked
2010-08-27 13:12 ajosey Tag Attached: tc1-2008
2013-04-16 13:06 ajosey Status Resolved => Closed