(j3.2006) the IEEE modules and distinguishing zero values

Malcolm Cohen malcolm
Tue Nov 15 01:08:25 EST 2011


>>> 14.9p7 says
>>> "The inquiry function IEEE_SUPPORT_STANDARD is provided to inquire
>>> whether the processor supports all the IEC 60559:1989 facilities
>>> defined in this part of ISO/IEC 1539 for a particular kind of real."
>>
>> That seems rather unclear to me; the text in 4.4.2.3 makes no reference
>> to IEC 60559;
>
>I think "this part of ISO/IEC 1539" means 1539-1 as opposed to 1539-2 and 
>1539-3.

Yes of course I know that.

> I don't see how it can mean 4.4.2.3.

Last time I looked 4.4.2.3 was included in "this part of ISO/IEC 1538"...
...more to the point, it contains the basic stuff about distinguishing zero.

And the question is whether that is an IEC 60559 facility per the wording in 
14.9.  I would think not.

>For IEEE_SUPPORT_DATATYPE, support is "as defined in the first paragraph of 
>14.9". This says
>
>"Complete conformance with IEC 60559:1989 is not required, but the normal 
>numbers shall be exactly those of an IEC 60559:1989 floating-point format, ..." 
>Here "normal" is used to distinguish from denormal numbers (numbers that are 
>near zero and do not have full precision).

So you are asserting that IEEE_SUPPORT_DATATYPE (the most basic and limited of 
the support queries) requires distinguishing zero in the 4.4.2.3 sense?  If so, 
I find that claim quite astonishing.  Certainly there are compilers that do not 
distinguish zero (in the 4.4.2.3 sense) and which have IEEE_SUPPORT_DATATYPE 
return TRUE; and I see no words here which go on to say "and the processor must 
distinguish between positive and negative zero in the intrinsic function SIGN 
(and ATAN2) and in formatted output".

None of the places in the standard (4.4.2.3, ATAN2, SIGN, formatted output,c14) 
mention that these are to be considered an "IEC 60559 feature", therefore it is 
NOT an IEC 60559 feature at all.

Furthermore, the very existence of IEEE_COPY_SIGN is a clear counter-example to 
the assertion: that function would serve no purpose whatsoever if the processor 
was required to distinguish zero in all cases where there was any IEC 60559 
support!

>This function was included originally to provide the IEEE copysign function.

Well yes, the point being that if IEEE_SUPPORT_DATATYPE requires distinguishing 
zero, then IEEE_COPY_SIGN is redundant with SIGN.  Adding IEEE_COPY_SIGN only 
made sense if SIGN had remained the same as in previous Fortran standards, i.e. 
treating all zeroes as positive.

Cheers,
-- 
................................Malcolm Cohen, Nihon NAG, Tokyo. 




More information about the J3 mailing list