commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bugs #9106] ByteBuffer.putDouble should use Double.doubleToRawLongBits


From: Tom Quarendon
Subject: [bugs #9106] ByteBuffer.putDouble should use Double.doubleToRawLongBits
Date: Wed, 26 May 2004 05:40:28 -0400
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705)

This mail is an automated notification from the bugs tracker
 of the project: classpath.




/**************************************************************************/
[bugs #9106] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9106>
Project: classpath
Submitted by: Tom Quarendon
On: Wed 05/26/04 at 09:36

Severity:  5 - Average
Resolution:  None
Assigned to:  None
Status:  Open
Platform Version:  None


Summary:  ByteBuffer.putDouble should use Double.doubleToRawLongBits

Original Submission:  When converting a double to a series of bytes before 
writing it to a buffer, the Double.doubleToRawLongBits method should be used, 
and not the Double.doubleToLongBits method. That way the bit pattern of the 
double is exactly preserved. Using doubleToLongBits writes all NaNs out with 
the same bit pattern. So if you write the Nan 
Double.longBitsToDouble(0x7ff800000000000CL) to a buffer then read it back in, 
you get Double.longBitsToDouble(0x7ff8000000000000L)











For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=9106>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]