calculating 64 bit hexadecimals

Y

Yodai

Hi all!

I have this big problem with making 64 bit hexa calculations and just found
out that windows calc CANNOT calculate more than 32 BIT!!! Does anybody know
of a reliable calculator to make double or long double hexadecimal
calculations that I can use? I really don't want to have to spend 300 euros
for an HP calculator and there HAS to be something around that I can
download. I have been trying to find something through google but none the
software I downloaded was accurate enough.

THANXS...

Yodai
 
J

Jirka Klaue

Yodai said:
I have this big problem with making 64 bit hexa calculations and just found
out that windows calc CANNOT calculate more than 32 BIT!!! Does anybody know
of a reliable calculator to make double or long double hexadecimal
calculations that I can use? I really don't want to have to spend 300 euros
for an HP calculator and there HAS to be something around that I can
download. I have been trying to find something through google but none the
software I downloaded was accurate enough.

http://gcc.gnu.org/

#include <stdio.h>
int main(void)
{
long long a = 0xDEADBEEF007, b = 0xAFFEAFFEAFFE;
printf("%llx + %llx = %llx\n", a, b, a + b);
}

gcc -Wall -std=c99 -o yodai yodai.c

Jirka
 
J

Joona I Palaste

Jirka Klaue said:
#include <stdio.h>
int main(void)
{
long long a = 0xDEADBEEF007, b = 0xAFFEAFFEAFFE;
printf("%llx + %llx = %llx\n", a, b, a + b);
}
gcc -Wall -std=c99 -o yodai yodai.c

"Affe Affe Affe"? Is this some German secret chant for invoking monkeys?
=)

--
/-- Joona Palaste ([email protected]) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"A bee could, in effect, gather its junk. Llamas (no poor quadripeds) tune
and vow excitedly zooming."
- JIPsoft
 
D

Dan Pop

In said:
http://gcc.gnu.org/

#include <stdio.h>
int main(void)
{
long long a = 0xDEADBEEF007, b = 0xAFFEAFFEAFFE;
printf("%llx + %llx = %llx\n", a, b, a + b);
}

gcc -Wall -std=c99 -o yodai yodai.c

Who says that if you use gcc -std=c99, the standard library installed on
the system will be automatically C99-conforming?

Dan
 
J

Jirka Klaue

Dan said:
Who says that if you use gcc -std=c99, the standard library installed on
the system will be automatically C99-conforming?

Nobody said it. One would hope so, though. Otherwise it would be quite
pointless to use -std=c99, wouldn't it?

Jirka
 
D

Dan Pop

In said:
Nobody said it. One would hope so, though. Otherwise it would be quite
pointless to use -std=c99, wouldn't it?

Precisely my point: it *is* pointless to use -std=c99 and expect code
using C99 *library* features to work. Proof:

mentor:~/tmp 11> cat test.c
#include <math.h>

int main()
{
return round(0);
}
mentor:~/tmp 12> gcc -std=c99 test.c -lm
Undefined first referenced
symbol in file
round /var/tmp/cc92eQ7s.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status

Things get even worse if the C99 function is there, but with different
semantics (as is the case with certain snprintf and freopen
implementations).

-std=c99 is only providing support for certain C99 *language*
features, and even that support might be broken (see
http://gcc.gnu.org/gcc-3.0/c99status.html for details).

Expecting anything else from -std=c99 is downright foolish.

Dan
 
M

Mac

Somehow, I don't have the OP's question on my news server so I'm replying
here.

This is totally off-topic, so no follow-ups please.

The version of windows calculator I have at work does support 64-bit data.
You have to select the quad-word radio selection to make it work.

I'm not at work now so I can't check the version.

Mac
--
 
J

John H. Guillory

Who says that if you use gcc -std=c99, the standard library installed on
the system will be automatically C99-conforming?

Being that this is a std. C newsgroup, I saved the above (which is not
standard C, but hey....) The output was not what I expected.... (I
compiled on Turbo C++ 3.0 for DOS) I got:

f007 + dbee = affe

Why not display the full contents of a,b, and c? I know on Turbo C++
for DOS, a long int is supposed to be 32 bits.... (at least I was
almost positive....) But granted, not guarantees according to
standard.... As far as the above, I don't believe C has any standard
for a voided main program.... And main should return a value....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,099
Messages
2,570,626
Members
47,237
Latest member
David123

Latest Threads

Top