From: Eddie R. <er...@bm...> - 2008-08-22 12:48:37
|
On Fri, 2008-08-22 at 01:42 +0200, Albert Graef wrote: > Eddie Rucker wrote: > NB: It would be possible to implement this for the bigint operations as > these are implemented as calls into the runtime, but I'd rather like > these to work consistently with the machine int operations. Also, this > is one of the cases where I think it's not really worth the effort, > because integer division by 0 almost invariably indicates a serious > program bug. Finally, note that you can still define x div 0 any way you > want as long as you're doing symbolic calculations (i.e., x is not an > integer). My judgment sucks as of late, but I say err on the side of consistency. If 1 div 0 is an error then 1L div 0L should be an error > I'm about to remove the definition of pow on double, it just duplicates > the functionality of the ^ operator anyway. Yes, there is no reason for duplicated functionality. e.r. |