Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000713 [1003.1(2013)/Issue7+TC1] System Interfaces Editorial Omission 2013-06-18 00:00 2021-04-15 19:58
Reporter nsz View Status public  
Assigned To
Priority normal Resolution Open  
Status New  
Name Szabolcs Nagy
Organization musl
User Reference
Section remquo
Page Number
Line Number
Interp Status ---
Final Accepted Text
Summary 0000713: in remquo quo should be unspecified when the result is NaN
Description the description of quo in remquo(x,y,quo) is

"In the object pointed to by quo, they store a value whose sign
is the sign of x/y and whose magnitude is congruent modulo 2^n
to the magnitude of the integral quotient of x/y, where n is an
implementation-defined integer greater than or equal to 3. If y
is zero, the value stored in the object pointed to by quo is
unspecified."

quo does not seem to be correctly specified when x/y
is +-Inf or NaN, only the y==0 special case is handled

this may affect ISO C as well
Desired Action add with MX shading that

 if x is +-Inf or x or y is NaN, *quo is unspecified

Tags c99
Attached Files

- Relationships

-  Notes
(0005312)
nick (manager)
2021-04-14 15:01

If the standard says nothing about this case (which it doesn't), then the value is implicitly unspecified.
(0005314)
kre (reporter)
2021-04-14 15:28

Re Note: 0005312 -- I hate "implicitly unspecified" - there are obviously
going to be cases (in general, not just here) where the standard says nothing,
because no-one ever thought that there was anything to say (never realised the
situation can occur).

But where such a case is brought to our attention, we should always be
explicit in the standard ("x is unspecified" is explicit) to avoid people
trying to read (usually invented) meaning into what is not there.
(0005317)
geoffclare (manager)
2021-04-15 09:08

Re: Note: 0005312 Yes it's implicitly unspecified, but that's the point. This bug is classed as editorial - it is pointing out that the wording is inconsistent in that it calls out one special case as explicitly unspecified and leaves the others as implicitly unspecified. It should either call out all of these cases explicitly or none of them.

I think the reason we suggested you should refer this to the C committee is purely as a courtesy in case they want to make an editorial improvement to their wording too.
(0005319)
kre (reporter)
2021-04-15 19:58
edited on: 2021-04-15 19:59

I am about to delete note:5313 as I realise now that that
the text I quoted is already in POSIX, but only applies to the
return value, not what is stored in *quo (the issue of this bug),
So, just ignore that one, for anyone who ever saw it.


- Issue History
Date Modified Username Field Change
2013-06-18 00:00 nsz New Issue
2013-06-18 00:00 nsz Name => Szabolcs Nagy
2013-06-18 00:00 nsz Organization => musl
2013-06-18 00:00 nsz Section => remquo
2013-06-20 15:54 nick Tag Attached: c99
2021-04-14 15:01 nick Note Added: 0005312
2021-04-14 15:23 kre Note Added: 0005313
2021-04-14 15:28 kre Note Added: 0005314
2021-04-15 09:08 geoffclare Note Added: 0005317
2021-04-15 19:58 kre Note Added: 0005319
2021-04-15 19:58 kre Note Deleted: 0005313
2021-04-15 19:59 kre Note Edited: 0005319


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker