80bit double from mac to 64bit double to pc 
Author Message
 80bit double from mac to 64bit double to pc

Hello,

Although not an ATL question...

I'm reading an 80bit double from a mac file, and need to convert that number
to 64bit double on pc.

I have a function that does the conversion from 80bit to 64bit, but I also
think I must account for big-endian/little-endian. Does
anybody know how to do that for that data type?

thanks,

--
Sigurd Lerstad



Tue, 15 Nov 2005 13:08:07 GMT  
 80bit double from mac to 64bit double to pc

Quote:
> Hello,

> Although not an ATL question...

> I'm reading an 80bit double from a mac file, and need to convert that
number
> to 64bit double on pc.

> I have a function that does the conversion from 80bit to 64bit, but I also
> think I must account for big-endian/little-endian. Does
> anybody know how to do that for that data type?

Just a guess...

Swap the bytes like you would for a longword followed by a longword followed
by a word. After all, both machines are 32 bit systems:

-1- -2- -3- -4-   -5- -6- -7- -8-   -9- -A-   Mac

-4- -3- -2- -1-   -8- -7- -6- -5-   -A- -9-   PC

HTH, Loz.



Tue, 15 Nov 2005 15:55:19 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. 80Bit <-> 64Bit double

2. 80Bit long double

3. result of double*double is no double

4. Binary representation of doubles: Mac vs DEC Unix

5. can long double be less precise than double?

6. Problem with Double.IsNan() and Double.Nan

7. epsilon for float, double long double

8. Difference between double and long double?

9. Converting long double to double

10. double != double best way [Q]

11. View double* as array of double?

12. Internal structure of long double and double

 

 
Powered by phpBB® Forum Software