Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
Subject: Re: Scoring out of bounds
Date: Tue, 04 Nov 2003 15:18:15 +0900	[thread overview]
Message-ID: <b9y4qxkhd20.fsf@jpl.org> (raw)
In-Reply-To: <vz65i0smwp.fsf@redqueen.bytechase.cx>

>>>>> In <vz65i0smwp.fsf@redqueen.bytechase.cx>
>>>>>	Norbert Koch <viteno@xemacs.org> wrote:

> Katsumi Yamaoka <yamaoka@jpl.org> writes:

>> (floor (+ (lsh -1 -1) 0.999))
>>  => 134217727

> Ah, I've always shifted in the other direction :-)

> I'm not sure whether to call this behaviour a bug.  If an operation
> returns an out of bound value, you've always got two possibilities:
> flag an error or silently convert it to the maximum allowed error.

I don't intend to complain to the XEmacs development team
because it is not an essential problem when the score value
grows unusually large. ;-)

I was simply surprised that XEmacs' floor (and other arithmetic
functions) cannot handle a floating point number over the half
of the maximum integer:

(floor (+ (/ most-positive-fixnum 2.0) 0.499))
 => 536870911
(floor (+ (/ most-positive-fixnum 2.0) 0.500))
 => ...
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



  reply	other threads:[~2003-11-04  6:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-02  8:54 Norbert Koch
2003-11-02 12:17 ` Norbert Koch
2003-11-04  4:04   ` Katsumi Yamaoka
2003-11-04  5:49     ` Norbert Koch
2003-11-04  6:18       ` Katsumi Yamaoka [this message]
2003-11-19  6:48     ` Katsumi Yamaoka
2003-11-20  7:30       ` Norbert Koch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b9y4qxkhd20.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).