gcalctool 5.28.2 does not overflow arithmetic operations in programming mode.

Asked by Allan W. Macdonald

When in programming mode, arithmetic operations do not wrap at word limits. For example, when in 16 bit mode, adding 1 to FFFF yields 10000, not zero. The result is no longer 16 bits.

This is completely wrong. This is not what someone familiar with digital computer architecture would expect to see in "programming mode". Computers do not normally automatically pick a higher word size upon overflow of an integer; they just wrap around to or past zero. This feature alone makes the calculator practically useless for realistic debugging methods such as looking for the occurrence of overflow in arithmetic operations.

Also, if in decimal mode, you enter -1, and switch to the Hex mode, you will not see the hex representation of this number, which should be 0xFFFF. Again, this is unexpected.

The trunc button doesn't work either. If I have FFFFF in the display area and press trunc, the word "trunc" appears but nothing happens. If I press enter, I get a "malformed expression" message.

I was hoping I could save time and use an existing tool but, alas, the tool is broken.

Am I off base here?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gcalctool Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

I suggest you report a bug

Can you help with this problem?

Provide an answer of your own, or ask Allan W. Macdonald for more information if necessary.

To post a message you must log in.