Robin 2012-01-23 10:43:36
”Shmuel (Seymour J.) Metz”
Shmuel (seymou 2012-01-23 10:43:48
at 04:16 AM, robin
Negating a number on a 2a complement machine. In practice that’s not
an issue for the same reason that the end-around carry isn’t an issue
on a 1s complement machine; you don’t use a serial-by-bit adder on a
Shmuel (Seymour J.) Metz, SysProg and JOAT
Any unsolicited bulk E-mail will be subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail.
Reply to domain Patriot dot net user shmuel+news to contact me. Do not reply
Glen herrmanns 2012-01-23 10:44:28
This came up in the Fortran newsgroup not so long ago. There are some
places in the language where a non-negative constant is needed, so a unary –
operator would be applied. Though others where signed constants are
In C, all constants are non-negative, with an optional unary – operator.
The most negative integer is not a legal constant in C, though a constant
expression having that value is allowed.
Glen herrmanns 2012-01-23 10:44:34
A processor that generates exceptions for fixed point overflow, and has
precise interrupts, must be careful about executing such instructions. If
it can’t generate an exception it is much easier for pipelined, or
out-of-order processors. Note that some of the earlier pipelined processors
were CDC machines. It may, or may not, be related.
Mark yudkin 2012-01-23 10:44:56
YOU BET IT IS! Never heard of imprecise interrupts on Intel? Never had a
PL/I program randomly fail on Intel because of an imprecise interrupt? If
not, it’s about time you searched the IBM PL/I APAR database. In fact, I
currently have a PMR for ERFC’s causing UNDERFLOW that is leading to a
random 8094 on PL/I (due to an imprecise interrupt in the library routine) open.
There are cases for both. In general most compilers will issue instructions
to normalize zeros where the machine doesn’t guarantee a specific zero
result. What’s important is that the user never sees 0 <> 0.
No they don’t. C doesn’t (by definition – it’s defined not to work!), I’ve
had Fortrans fail, and I opened a PMR against VA PL/I way back that also got
it wrong (since fixed).