From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/54662 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Scoring out of bounds Date: Tue, 04 Nov 2003 13:04:17 +0900 Organization: Emacsen advocacy group Sender: ding-owner@lists.math.uh.edu Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1067918728 8507 80.91.224.253 (4 Nov 2003 04:05:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Nov 2003 04:05:28 +0000 (UTC) Original-X-From: ding-owner+M3203@lists.math.uh.edu Tue Nov 04 05:05:26 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AGsRa-0001BU-00 for ; Tue, 04 Nov 2003 05:05:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1AGsR9-0007SX-00; Mon, 03 Nov 2003 22:04:59 -0600 Original-Received: from justine.libertine.org ([66.139.78.221]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1AGsR5-0007SS-00 for ding@lists.math.uh.edu; Mon, 03 Nov 2003 22:04:55 -0600 Original-Received: from washington.hostforweb.net (washington.hostforweb.net [69.61.11.2]) by justine.libertine.org (Postfix) with ESMTP id 14B9D3A004F for ; Mon, 3 Nov 2003 22:04:55 -0600 (CST) Original-Received: from yamaoka by washington.hostforweb.net with local (Exim 4.24) id 1AGsRA-0003ub-5R for ding@gnus.org; Mon, 03 Nov 2003 23:05:00 -0500 Original-To: Ding Mailing List X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.1003 (Gnus v5.10.3) XEmacs/21.4 (Reasonable Discussion, linux) Cancel-Lock: sha1:mSadM+D/8Rjdt41I2z2b7kF83ls= X-Payment: hashcash 1.2 0:031104:ding@gnus.org:32e29a1f1971e1b5 X-Hashcash: 0:031104:ding@gnus.org:32e29a1f1971e1b5 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - washington.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [32041 32041] / [47 12] X-AntiAbuse: Sender Address Domain - washington.hostforweb.net Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:54662 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:54662 >>>>> In >>>>> Norbert Koch wrote: >> Something's pushing scores up too high (my bad), but maybe it should >> be bound in gnus-decay-score to prevent such errors? > Here's a possible fix > --- gnus-score.el 13 Aug 2003 16:34:46 -0000 6.35 > +++ gnus-score.el 2 Nov 2003 12:14:46 -0000 > @@ -2918,13 +2918,15 @@ > (defun gnus-decay-score (score) > "Decay SCORE according to `gnus-score-decay-constant' and `gnus-score-decay-scale'." > - (floor > - (- score > - (* (if (< score 0) -1 1) > - (min (abs score) > - (max gnus-score-decay-constant > - (* (abs score) > - gnus-score-decay-scale))))))) > + (condition-case nil > + (floor > + (- score > + (* (if (< score 0) -1 1) > + (min (abs score) > + (max gnus-score-decay-constant > + (* (abs score) > + gnus-score-decay-scale)))))) > + (arith-error most-positive-fixnum))) I've committed it with a slight modification[1]. Thanks. BTW, isn't it an XEmacs bug? Emacs's floor can handle the value of an argument that it returns the maximum integer: (floor (+ (lsh -1 -1) 0.999)) => 134217727 [1] The most-positive-fixnum variable is not always available in 21.3 or older versions of Emacs since it is defined in cl.el. -- Katsumi Yamaoka