From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master ac1d15e95c 1/2: ; * src/data.c (Fash): More precise doc string Date: Tue, 19 Jul 2022 22:04:24 +0300 Message-ID: <83h73cncuf.fsf@gnu.org> References: <831quhnrf8.fsf@gnu.org> <063D21A9-801C-411B-B59C-AA7A057DFF79@acm.org> <83v8rtmb4r.fsf@gnu.org> <83r12hm733.fsf@gnu.org> <4785DD4F-423E-498C-B18D-A5B104F38147@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29462"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 19 21:05:17 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oDsWy-0007Qc-WD for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Jul 2022 21:05:17 +0200 Original-Received: from localhost ([::1]:48596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDsWx-0001y3-T2 for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Jul 2022 15:05:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDsWL-0001I2-1M for emacs-devel@gnu.org; Tue, 19 Jul 2022 15:04:37 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41966) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDsWK-0002vs-Lg; Tue, 19 Jul 2022 15:04:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=EbAE9VbeH7hj+1ZsTR+kb0xW0NqgkQKEcjbJrEjOfU4=; b=j8CQfUbWKH8XP9KVs87F qrEZKBmiEG4SRCauvn0DIhPcgNp8ghuUxWTh8ValjyvVYdH4g25dHzkBpi6YB1ME78AZGmBJB/KuU NGlZVjg/EA6Oam7rTnLuJ2kKvHtNap4LpYFHsh3YoYaHRYTXX2Ygz2LuLct8NeEnEEzvuCiFBXfkA RUeAtHJl/H3Rmx/jomj5wW/65bVAkVf4oBVwQyk0hzVhtzTvQ7/gZ+dM1L8e0Wh/bcdMV8i0fWh89 uCE42tVyDkOuVlquyEtPx3mPkWzioQ2HOHe8C8Cb6pyB4yAkbR66E6N400MLqlKjrM16Oz7qpYSXE bduDFANDjKboaQ==; Original-Received: from [87.69.77.57] (port=4149 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDsWJ-0000fT-Ui; Tue, 19 Jul 2022 15:04:36 -0400 In-Reply-To: <4785DD4F-423E-498C-B18D-A5B104F38147@acm.org> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Tue, 19 Jul 2022 19:46:24 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:292290 Archived-At: > From: Mattias EngdegÄrd > Date: Tue, 19 Jul 2022 19:46:24 +0200 > Cc: emacs-devel@gnu.org > > 19 juli 2022 kl. 17.54 skrev Eli Zaretskii : > > > The operation is "bit shift", so > > the most natural way of describing it is in terms of shifting bits. > > No? > > Not necessarily. The user inputs numbers and gets a number out, not bit sequences, so it makes sense to describe the behaviour in arithmetic terms. (We're not describing a processor instruction that manipulates registers; `ash` is an operation on mathematical integers.) > > A bitwise description would require knowledge of two's complement representation which you dismissed earlier. If it's acceptable to complement the arithmetic description with something that refers to such representation, then we could have: > > If we view VALUE as a binary two's complement number, then shifting left introduce new 0-bits to the right and shifting right remove rightmost bits. > Since negative numbers have an infinite supply of 1-bits to the left, a negative number remains negative no matter how far it is shifted in either direction. Sigh. You know what, forget about this. I will fix this myself, time permitting.