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.bugs Subject: bug#62658: [Typo] in Calc-Manual: Rewrite Rules - exercise 1 Date: Sat, 08 Apr 2023 19:15:20 +0300 Message-ID: <83jzymmjtz.fsf@gnu.org> References: <83ile9qpk4.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35448"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62658-done@debbugs.gnu.org To: Garid Zorigoo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 08 18:15:23 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1plBDm-00090H-U4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Apr 2023 18:15:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1plBDa-0000Qc-1q; Sat, 08 Apr 2023 12:15:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1plBDT-0000OM-5E for bug-gnu-emacs@gnu.org; Sat, 08 Apr 2023 12:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1plBDS-000215-T8 for bug-gnu-emacs@gnu.org; Sat, 08 Apr 2023 12:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1plBDS-0008O7-Ax for bug-gnu-emacs@gnu.org; Sat, 08 Apr 2023 12:15:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Apr 2023 16:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 62658 X-GNU-PR-Package: emacs Mail-Followup-To: 62658@debbugs.gnu.org, eliz@gnu.org, garidzorigoo@gmail.com Original-Received: via spool by 62658-done@debbugs.gnu.org id=D62658.168097049332204 (code D ref 62658); Sat, 08 Apr 2023 16:15:02 +0000 Original-Received: (at 62658-done) by debbugs.gnu.org; 8 Apr 2023 16:14:53 +0000 Original-Received: from localhost ([127.0.0.1]:59372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plBDI-0008NL-Il for submit@debbugs.gnu.org; Sat, 08 Apr 2023 12:14:52 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plBDH-0008NA-Bs for 62658-done@debbugs.gnu.org; Sat, 08 Apr 2023 12:14:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1plBDB-0001xM-QQ; Sat, 08 Apr 2023 12:14:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=oPpt8uqEF8HwGktet/JwV9vT7MdFfUp0iPvmsojcVuk=; b=sBgzb5ob9oza 1CMYAjtvx8nIKXTbcfXVD7oMIzmdtKQEdlBGGHHeGGCK2/5itASri4mioFg9tCS2iZQ3nPALFr33y BLVcHkVB+1KdpaCGoOulohqym/BZUxDnQqw2MfZ18QLYsOgF1lrl73Ymvp6/1+Knanoc8p+4aTzr2 IIlbbYrj+RiBJeGaC8LeFphxA5plZxdIiGzg01FggMdFludxff3oVViZimneO9lGpDE4bblwFQet7 p3MHf89RAQlruSyazXF29O6vYe3hfR2sNy0e+9rbmgrpkwMX3nh6woXsm8diBzw+G/9bLWgHO9Fhw 97E8fXQYkqWcKNr89fmxtA==; Original-Received: from [87.69.77.57] (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 1plBDB-00065o-1H; Sat, 08 Apr 2023 12:14:45 -0400 In-Reply-To: (message from Garid Zorigoo on Fri, 7 Apr 2023 21:46:21 +0900) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259484 Archived-At: > From: Garid Zorigoo > Date: Fri, 7 Apr 2023 21:46:21 +0900 > Cc: 62658@debbugs.gnu.org > > > It's possible. But I tried to run the example, and I seem to be > > unable to get past the formula I'm asked to enter after the "m s" > > part: I get error messages. > > Sorry, which "m s" are you referring to? > The section I referred to (from the start of "3.5.2 Rewrite Rules" to > first 2 entries of "Exercise 1") didn't have the command "m s". > > > Could you perhaps show the commands and keys to type > > To reproduce it'll need the following commands (in emacs -Q). > (These are copied from Rewrite-Rules 3.5.2 (in emacs-28) > or 2.5.2 (website). I picked up only entries /omitted outputs/) > > > ' 2sec(x)^2/tan(x)^2 - 2/tan(x)^2 s 1 > a r a/x + b/x := (a+b)/x > a r sec(x)^2 := 1 + tan(x)^2 > > > ' a/x + b/x := (a+b)/x s t merge > ' sec(x)^2 := 1 + tan(x)^2 s t secsqr > r 1 a r merge a r secsqr > > > ' [merge,sinsqr] = > s t trig r 1 a r trig > > > According to the manual, the output after the last line should be 2. > > I wrote the following tables, slightly detailed manner. > The First column represents what you enter, the 2nd column represents what > the result is. > > Part I: (Not required for re-creating error) > | command | result | > |---------------------------------------+-----------------------------| > | '2sec(x)^2/tan(x)^2 - 2/tan(x)^2 | 2sec(x)^2/ ... | > | s 1 | same | > | a r a/x + b/x := (a+b)/x | (2 sec(x)^2 - 2) / tan(x)^2 | > | a r sec(x)^2 := 1 + tan(x)^2 | 2 | > > Part II: (required for re-creating error, because saving expressions) > | command | result | > |----------------------------------+-----------------------------| > | ' a/x + b/x := (a+b)/x | a/x + b/x := (a+b)/x | > | s t merge | disappear | > | ' sec(x)^2 := 1 + tan(x)^2 | sec(x)^2 := 1 + tan(x)^2 | > | s t secsqr | disappear | > | r 1 | 2sec(x)^2/... | > | a r merge | (2 sec(x)^2 - 2) / tan(x)^2 | > | a r secsqr | 2 | > > > Exercise I: > | command | result | > |------------------------+------------------------------------------| > | ' [merge,sinsqr] | [merge,sinsqr] | > | = | [a / x + b / x := (a + b) / x, sinsqr] | > | | above, you can see sinsqr didn't expands | > | | | > | s t trig | disappear | > | r 1 | 2 sec(x)^2 / tan(x)^2 - 2 / tan(x)^2 | > | a r trig | 2 sec(x)^2 / tan(x)^2 - 2 / tan(x)^2 | > | | above, you can see it didn't change. | > | | It should've outputted 2 | > > > Here is what I think it should be: > Exercise I (My suggestion): > | command | result | > |------------------------+--------------------------------------------| > | ' [merge,secsqr] | [merge,secsqr] | > | = | [a / x + b / x := (a + b) / x, sec(x)^2... | > | | above, you WILL see SECSQR expands | > | | | > | s t trig | disappear | > | r 1 | 2 sec(x)^2 / tan(x)^2 - 2 / tan(x)^2 | > | a r trig | 2 | > | | above, you WILL see 2 | > > > (Just in case, it might being helpful, I also attached the > asciicinema recording in the email) Thanks, I've now made the fix, and I'm closing this bug.