Thanks for your reply Leyland, Your idea worked. Thanks once
again.
regards
Vijayan Pandalai.
-------Original Message-------
Date: Monday, July 09,
2001 06:21:24 PM
Subject: Re: [JAVA3D]
Need of Equivalent code in Java
The problem may be because its backwards. That is, it may
be an issue of big endian and little endian... I'm not sure if this
will work... try reversing the process and looking at the bits by using
the function Double.doubleToLongBits...
Also as a quicky you can
try reversing the byte order dont know how much that'll
help...
byte arr[8]; long bits=0; double
db;
for(i=0;i<8;i++) arr[i] =
getbyte();
for(i=7;i>=0;i++) //reversed bits = (bits <<
8) | arr[i];
db = Double.longBitsToDouble(bits);
I dont know
if that will work, but its worth a quick try, if it really is an endian
issue you may have to do more in terms of reversing the bits of
the individual bytes (yuck). If not, like I said try something
like
long bits = Double.doubleToLongBits();
And then looking
at the individual bytes..
Leyland
Needham
=========================================================================== To
unsubscribe, send email to [EMAIL PROTECTED] and include in the
body of the message "signoff JAVA3D-INTEREST". For general help, send
email to [EMAIL PROTECTED] and include in the body of the message "help". |