
1 Apr
2005
1 Apr
'05
9:17 a.m.
Jonathan Turkanis wrote: [snip]
It seems to me that in some cases developers will be able to reason that based on the numerators and denominators of the instances of rationals they explicitly construct and the type and number of operations they need to perform, no overflow will occur if they use, say, rational<int>. In some cases, they will reason incorrectly; this is the type of logic error which might be usefully signaled using assertions.
I hope you meant using exceptions as it is not possible to test all possible inputs to the calculations Keith Burton