
30 May
2006
30 May
'06
2:07 p.m.
Maarten Kronenburg escreveu: [SNIP]
Negating an unsigned with value zero is perfectly legal. When it is not zero, it can throw an exception, as a good numeric class is supposed to do.
I disagree. Infinite integer objects will probably live inside long, inner loops; inside those loops what you _don't want_ is the overhead of a try/catch block. (Or any kind of overhead, for that matter.) Such a loop should be written not to break infinite integer arithmetic rules instead; and to help users achieve this, the infinite integer library should allow the least possible possibilities of rule-breaking. And do that at compile time, for maximum performance. -- Pedro LamarĂ£o