switch format between 64 bit double and 64 bit integer


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting switch format between 64 bit double and 64 bit integer
# 1  
Old 06-28-2009
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?
# 2  
Old 06-29-2009
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.
# 3  
Old 06-30-2009
I will have to do it in another way or go to perl.

Thank you!
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Which version of Windows Vista to install with a product key? 32-bit or 64-bit?

Hello everyone. I bought a dell laptop (XPS M1330) online which came without a hard drive. There is a Windows Vista Ultimate OEMAct sticker with product key at the bottom case. I checked dell website (here) for this model and it says this model supports both 32 and 64-bit version of Windows... (4 Replies)
Discussion started by: milhan
4 Replies

2. Shell Programming and Scripting

How to handle 64 bit arithmetic operation at 32 bit compiled perl interpreter?H

Hi, Here is the issue. From the program snippet I have Base: 0x1800000000, Size: 0x3FFE7FFFFFFFF which are of 40 and 56 bits. SO I used use bignum to do the math but summing them up I always failed having correct result. perl interpreter info, perl, v5.8.8 built for... (0 Replies)
Discussion started by: rrd1986
0 Replies

3. Solaris

Switch to 64-bit kernel on Solaris x86

I know this is probably a dumb question, but all of my Google and forum searches have been coming up empty. I mostly work with SPARC. How do you switch Solaris on x86 from 32-bit to 64-bit? When I do a uname -a on a newly installed machine I get "SunOS XXXXXXX 5.10 Generic_144489-17 i86pc i386... (8 Replies)
Discussion started by: christr
8 Replies

4. UNIX for Advanced & Expert Users

migrating unix mp-ras 32 bit to linux suse 64 bit

Hi. I need to migrate the whole unix environment from a Unix mp-ras 32 bit to a Linux Suse 64 bit. 1) can i use cpio to copy the data? 2) can i just copy the users from unix to linux or do i have to create them by hand 3) are there any other concerns i should worry about? thanx (1 Reply)
Discussion started by: mrodrig
1 Replies

5. Programming

copying or concatinating string from 1st bit, leaving 0th bit

Hello, If i have 2 strings str1 and str2, i would like to copy/concatenate str2 to str1, from 1st bit leaving the 0th bit. How do i do it? (2 Replies)
Discussion started by: jazz
2 Replies
Login or Register to Ask a Question