unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Garid Zorigoo <garidzorigoo@gmail.com>
Cc: 62658-done@debbugs.gnu.org
Subject: bug#62658: [Typo] in Calc-Manual: Rewrite Rules - exercise 1
Date: Sat, 08 Apr 2023 19:15:20 +0300	[thread overview]
Message-ID: <83jzymmjtz.fsf@gnu.org> (raw)
In-Reply-To: <CAEDgBW5OpnHYUkyhYtgLOZLZHo4QqO+bUV9idgFo5rqPzF=kkg@mail.gmail.com> (message from Garid Zorigoo on Fri, 7 Apr 2023 21:46:21 +0900)

> From: Garid Zorigoo <garidzorigoo@gmail.com>
> 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 <RET>   s 1
>     a r a/x + b/x := (a+b)/x <RET>
>     a r sec(x)^2 := 1 + tan(x)^2 <RET>
> 
> 
>     ' a/x + b/x := (a+b)/x <RET>          s t merge <RET>
>     ' sec(x)^2 := 1 + tan(x)^2 <RET>      s t secsqr <RET>
>     r 1                  a r merge <RET>  a r secsqr <RET>
> 
> 
>     ' [merge,sinsqr] <RET>          =
>     s t trig <RET>  r 1                  a r trig <RET>
> 
> 
> 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<RET> | 2sec(x)^2/ ...              |
> | s 1                                   | same                        |
> | a r  a/x + b/x := (a+b)/x <RET>       | (2 sec(x)^2 - 2) / tan(x)^2 |
> | a r sec(x)^2 := 1 + tan(x)^2 <RET>    | 2                           |
> 
> Part II: (required for re-creating error, because saving expressions)
> | command                          | result                      |
> |----------------------------------+-----------------------------|
> | ' a/x + b/x := (a+b)/x <RET>     | a/x + b/x := (a+b)/x        |
> | s t merge <RET>                  | disappear                   |
> | ' sec(x)^2 := 1 + tan(x)^2 <RET> | sec(x)^2 := 1 + tan(x)^2    |
> | s t secsqr <RET>                 | disappear                   |
> | r 1                              | 2sec(x)^2/...               |
> | a r merge <RET>                  | (2 sec(x)^2 - 2) / tan(x)^2 |
> | a r secsqr <RET>                 | 2                           |
> 
> 
> Exercise I:
> | command                | result                                   |
> |------------------------+------------------------------------------|
> | ' [merge,sinsqr] <RET> | [merge,sinsqr]                           |
> | =                      | [a / x + b / x := (a + b) / x, sinsqr]   |
> |                        | above, you can see sinsqr didn't expands |
> |                        |                                          |
> | s t trig <RET>         | disappear                                |
> | r 1                    | 2 sec(x)^2 / tan(x)^2 - 2 / tan(x)^2     |
> | a r trig <RET>         | 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] <RET> | [merge,secsqr]                             |
> | =                      | [a / x + b / x := (a + b) / x, sec(x)^2... |
> |                        | above, you WILL see SECSQR expands         |
> |                        |                                            |
> | s t trig <RET>         | disappear                                  |
> | r 1                    | 2 sec(x)^2 / tan(x)^2 - 2 / tan(x)^2       |
> | a r trig <RET>         | 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.





      reply	other threads:[~2023-04-08 16:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-03 18:12 bug#62658: [Typo] in Calc-Manual: Rewrite Rules - exercise 1 Garid Zorigoo
2023-04-06 10:21 ` Eli Zaretskii
2023-04-07 12:46   ` Garid Zorigoo
2023-04-08 16:15     ` Eli Zaretskii [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83jzymmjtz.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=62658-done@debbugs.gnu.org \
    --cc=garidzorigoo@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).