switch format between 64 bit double and 64 bit integer

In order to perform some arithmetical operations on 64 bit double I need to transform of the binary representation of a 64 bit double to a 64
bit integer do the operations and then transform back to 64 bit double.

I understand bash and bc doesn't allow to do that. I think my only tool left is AWK.

Any suggestion?

awk does not work with binary data - it is a reporting tool, and was coded to use text - ie., it doesn't treat ASCII nul as anything but the end of a string. Your numeric binary data will be trashed.

You are going to have to consider C. perl and other non-compiled languages support 32 bit doubles, there may be some extensions to perl 64 bit double support. I do not know.

I will have to do it in another way or go to perl.

Thank you!