PROBLEM:	(QAR 48474)	(Patch ID: OSF410-400083)
********
This fix changes the encoding of IEEE floating-point Quiet NaNs returned by
the math library by setting the sign bit. 

This fix corrects inconsistency between the value returned by the math functions
and the kernel encoding.

A NaN is the floating-point representation of a result that is "Not a Number"
(e.g. the floating-point result of zero divided by zero is a NaN).

This change is only of interest to programmers who use IEEE floating-point math
with the -ieee or the -ieee_with_inexact opion.  It does not affect programs
or libraries not using the full IEEE math support. 

For more information, see the IEEE Standard for Binary Floating Point Arithmetic
ANSI/IEEE (Std 754-1985). For information about the Alpha AXP implementation, 
see the Alpha AXP Architecture Reference Manual (Second Edition) by 
Richard L. Sites and Richard T. Witek, Digital Press, 1995.  See the section
on "Encodings" (4.7.4).

Compile the following program using the -ieee and -lm options:

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
main()
{
    double a, b, c, d;
    int i;

    a = sqrt( -1.0 );
    i = sscanf("0.0 0.0 0.0", "%lf %lf %lf", &b, &c, &d);
    assert(i == 3);
    printf( "sqrt( -1.0 ) = %f\t\t0x%016lx\n", a, *(long *)&a );
    
    d = b / c;

    printf( "0.0 / 0.0 = %f\t\t0x%016lx\n", d,*(long *)&d );
}

Compile this program using the -ieee and -lm command line options.

Results before installing new math library:
sqrt( -1.0 ) = NaNQ             0x7fffffffffffffff
0.0 / 0.0 = -NaNQ               0xfff8000000000000

Results after installing new math library:
sqrt( -1.0 ) = -NaNQ            0xfff8000000000000
0.0 / 0.0 = -NaNQ               0xfff8000000000000


FILE(s):

/usr/ccs/lib/libm.a		subset OSFLIBA410
CHECKSUM: 38043    660
/usr/shlib/libm.so		subset OSFBASE410
CHECKSUM: 63782    544
