View Issue Details

IDProjectCategoryView StatusLast Update
00006051003.1(2008)/Issue 7System Interfacespublic2019-06-10 08:55
Reportertydeman Assigned Toajosey  
PrioritynormalSeverityCommentTypeClarification Requested
Status ClosedResolutionAccepted As Marked 
NameFred J. Tydeman
OrganizationTydeman Consulting
User ReferenceXSH System Interfaces
Sectionfmod()
Page Number870
Line Number28887
Interp StatusApproved
Final Accepted Textsee 0000605:0001367
Summary0000605: fmod(NaN,0), fmod(infinity,NAN), fmod(0,NaN) are ambiguous
DescriptionIt is not clear if line 29304:
  If x or y is NaN, a NaN shall be returned.
overrides line 29305:
  If y is zero, ...
and line 29306
  If x is infinite, ...
and line 29307
  If x is +/-0 ...
for the cases fmod(NaN,0), fmod(infinity,NAN) and fmod(0,NaN).

C11 in F.10 has (paragraph 11):
    Functions with a NaN argument return a NaN result and raise no
    floating-point exception, except where stated otherwise.

F.10.7.1 has:
  fmod(±0, y) returns ±0 for y not zero.
and
  fmod(x, y) returns a NaN and raises the ‘‘invalid’’ floating-point
  exception for x infinite or y zero (and neither is a NaN).
So, the 1st case does not mention other argument being a NaN,
and the 2nd case does mention other argument being a NaN,

As far as I recall, all implementations return NaN if any argument is a NaN,
and do not indicate any kind of error.
Desired ActionIn lines 29305-7, add words about other argument not being a NaN.
Tagstc2-2008

Relationships

related to 0000320 Closedajosey 1003.1(2004)/Issue 6 For MX shaded text NaN errors are required 

Activities

eblake

2012-09-19 15:44

manager   bugnote:0001367

Last edited: 2012-09-19 15:56

Interpretation response
------------------------
The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor.

Rationale:
-------------
It was ambiguous whether a domain error shall occur, the suggested change matches existing implementation of no domain error.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------

[These edits are based on the text in Issue 7; although the original Description and Desired Action were based off of a draft for TC1 with other changes in neighboring text already incorporated.]

On page 870 line 28887, change:

If x or y is NaN, a NaN shall be returned.

to:

If x or y is NaN, a NaN shall be returned, and none of the conditions below shall be considered.

ajosey

2013-03-29 08:06

manager   bugnote:0001524

Interpretation Proposed 29 Mar 2013

ajosey

2013-05-03 12:18

manager   bugnote:0001571

Interpretation approved 3 May 2013

Issue History

Date Modified Username Field Change
2012-09-12 20:37 tydeman New Issue
2012-09-12 20:37 tydeman Status New => Under Review
2012-09-12 20:37 tydeman Assigned To => ajosey
2012-09-12 20:37 tydeman Name => Fred J. Tydeman
2012-09-12 20:37 tydeman Organization => Tydeman Consulting
2012-09-12 20:37 tydeman User Reference => XSH System Interfaces
2012-09-12 20:37 tydeman Section => fmod()
2012-09-12 20:37 tydeman Page Number => 876
2012-09-12 20:37 tydeman Line Number => 29305-7
2012-09-19 15:44 eblake Note Added: 0001367
2012-09-19 15:48 eblake Note Edited: 0001367
2012-09-19 15:52 eblake Page Number 876 => 870
2012-09-19 15:52 eblake Line Number 29305-7 => 28887
2012-09-19 15:52 eblake Interp Status => Pending
2012-09-19 15:52 eblake Final Accepted Text => see 0000605:0001367
2012-09-19 15:52 eblake Status Under Review => Interpretation Required
2012-09-19 15:52 eblake Resolution Open => Accepted As Marked
2012-09-19 15:52 eblake Tag Attached: tc2-2008
2012-09-19 15:53 eblake Relationship added related to 0000320
2012-09-19 15:55 eblake Note Edited: 0001367
2012-09-19 15:56 eblake Note Edited: 0001367
2013-03-29 08:06 ajosey Interp Status Pending => Proposed
2013-03-29 08:06 ajosey Note Added: 0001524
2013-05-03 12:18 ajosey Interp Status Proposed => Approved
2013-05-03 12:18 ajosey Note Added: 0001571
2019-06-10 08:55 agadmin Status Interpretation Required => Closed