How to input 64-bit hex values in octave

Posted by Chris Ashton on Super User See other posts from Super User or by Chris Ashton
Published on 2012-09-11T21:07:05Z Indexed on 2012/09/11 21:41 UTC
Read the original article Hit count: 365

Filed under:
|
|

I'm trying to use Octave as a programmer's calculator. I want to input a 64-bit pointer, but when I do apparently the 64-bit value gets silently truncated to 32-bit:

octave:44> base_ptr=0x1010101020202020
base_ptr =  538976288
octave:45> uint64(base_ptr)
ans = 538976288
octave:46> printf("%lx\n", base_ptr)
20202020

So it seems like it's truncated the input value to the low 32-bits. I would use scanf, but the docs say it should only be used internally.

How can I input the full 64-bit value?

Alternately, is there some awesome free programmer's calculator out there for Windows? (I know Windows calculator has a programmer's mode but I would like arbitrary variable support). I tried using my ti-89 but it also doesn't support 64-bit hex.

© Super User or respective owner

Related posts about 64-bit

Related posts about octave