48
Objet : Re: Need of Equivalent code in Java
> Thanks a lot Leyland. Ur code is very useful to us and it helped us to
> proceed further.. Thanks again.
>
> Regards,
> ishwari
>
> ----- Original Message -
> From: "Leyland Needham" <[EMAIL PROTECTED]>
Thanks a lot Leyland. Ur code is very useful to us and it helped us to
proceed further.. Thanks again.
Regards,
ishwari
- Original Message -
From: "Leyland Needham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 8:51 PM
Subject: Re: [JAVA
PROTECTED]
Subject: Re: [JAVA3D]
Need of Equivalent code in Java
The problem may be because its backwards. That is, it may
be an issue of bigendian and little endian... I'm not sure if this
will work... try reversingthe process and looking at the bits by
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
I have not tried his code, but you should get a better idea looking at it
like this...
byte arr[8];
long bits=0;
double db;
for(i=0;i<8;i++)
arr[i] = getbyte();
for(i=0;i<8;i++)
bits = (bits << 8) | arr[i];
db = Double.longBitsToDouble(bits);
basicly convert the array of bytes to a si
longBitsToDouble I think.. Can u help me in correcting this
problem?
Regards,
ishwari
- Original Message -
From:
Martin Desruisseaux
To: [EMAIL PROTECTED]
Sent: Monday, July 09, 2001 4:07 PM
Subject: Re: [JAVA3D] Need of Equivalent
code in Java
Hi Ishwari
: [JAVA3D] Need of Equivalent
code in Java
Hi Ishwari
You may try that:
long bits=0;
for (int i=0; i<8; i++)
{
bits = (bits << 8) | getByte();
}
double value = Double.longBitsToDouble(bits);
Martin.
- Message d'origine -
De
Hi Ishwari
You may try that:
long bits=0;
for (int i=0; i<8; i++)
{
bits = (bits << 8) | getByte();
}
double value = Double.longBitsToDouble(bits);
Martin.
- Message d'origine -
De
: ishwari
Envoyé : lundi 9 juillet 2001
04:23
Objet : Need of Equival
Hi,
I have the follg code in c++. I wish to have the
equivalent code in Java.. Can anyone help me in getting it??
c++ code:
BYTE arr[8];
double *dbptr;
for(i=0;i<8;i++)
arr[i] = getbyte();
dbptr = (double *)arr;
Thanks in advance,
Regards,
ishwari