| What is x'8000 0000' interpreted as HFP? It does not occur as the result of an in-line or library-subroutine operation, both of which are coerced to be x'0000_0000', a 2C poositive zero.
What happens when this value is made to figure in an arithmetic operation using EQUIVALENCE or one of the pointer-mediated operations now supported in many FORTRANs I don't really know, but I will conduct some experiments and report on their results tomorrow. --jg On 1/8/12, glen herrmannsfeldt <[email protected]> wrote: > (snip, someone wrote) > >> o IBM hexadecimal floating-point, HFP, > >> o ANSI binary floating-point, BFP, and > >> o ANSI decimal floating-point, DFP. > >> Of these the first two, HFP and BFP, make zeros positive; but the >> third, DFP, supports both positive and negative zeros. > > The change to the Fortran standard comes, I believe, from support > for IEEE binary floating point, which is what went into IBM's BFP. > > Among others, the reciprocal of -Infinity is supposed to be negative zero. > > DFP, from the new IEEE standard, should also include all the negative > zero properties of the old standard. > > (snip, someone else wrote) >> What is x'8000 0000' interpreted as HFP? > > I do remember that LNER and LCER generate negative zero, but > I am not sure about some other cases. How about: > > X=-1e73 > Y=1e-10/X > > with exponent underflow mask bit off? > > In any case, in all three (HFP, BFP, and DFP) negative zero and > positive zero compare as equal. It is only with tests like SIGN(X) > in Fortran that you can detect negative zero. > > Many years ago, I learned that the CALL/OS Fortran compiler > (or, more likely, library) would print +0.0 if given a negative zero. > No sign was printed for positive zero. > > -- glen > -- John Gilmore, Ashland, MA 01721 - USA
