Handling double (8 byte) in Arduino mega 2560? I am receiving 8 bytes from serial.

I want to convert and save in double variable. 

This is how i tried.

union u_data
    {
        byte b[4];
        double fval;
    } u;

double BytesToDouble (byte b8,byte b7,byte b6,byte b5,byte b4,byte b3,byte b2,byte b1)
{   
    u.b[0] = b1;
    u.b[1] = b2;
    u.b[2] = b3;
    u.b[3] = b4;
    u.b[4] = b5;
    u.b[5] = b6;
    u.b[6] = b7;
    u.b[7] = b8;
 return u.fval;
}


But i am getting 0.00. Because here double size is 4 bytes.

Is there is any other way to do this?

Thanks
In the Arduino there is no such thing as a double. A double is just another name for a float.

So you will have to either:


Manually interpret the double format data and calculate that into a float value, or
Send the value as some other format, such as float (32-bit), ASCII text, or (a selection of) integer values.


Since you can't actually use anything more than float, sending data with a higher resolution is pointless, so you are probably best off just sending it as a float.