Software Archive
Read-only legacy content
17061 Diskussionen

How to do unsigned integer/64 bit ops?

WSinc
Neuer Beitragender I
496Aufrufe
When dealing with other platforms where some of the data (telemetry for example) is unsigned integers, is there a way to treat such quantities accordingly in the compiler? I could not find the equivalent of the UNSIGNED key word, like in C++.

Also, how can I do a 32 bit by 32 bit unsigned multiply to get a 64 bit unsigned result? I would eventually like to develop a long number package when I can do operations with very long integers, as for example encryption algorithms.

Example: C=A*B where A and B are 512 bits each, but also to be able to take a MODULO, do long division, etc.
0 Kudos
1 Antworten
Steven_L_Intel1
Mitarbeiter
496Aufrufe
Fortran doesn't have the concept of "unsigned".

There's an existing quadruple-precision arithmetic package, pointed to from our Companion Products page.

The next version, free to 6.5 users, will support INTEGER*8 (and LOGICAL*8). Look for it in August.

Steve
Antworten