GNU bug report logs -
#62658
[Typo] in Calc-Manual: Rewrite Rules - exercise 1
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 62658 in the body.
You can then email your comments to 62658 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62658
; Package
emacs
.
(Tue, 04 Apr 2023 05:32:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Garid Zorigoo <garidzorigoo <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 04 Apr 2023 05:32:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
In Calc's Manual 2.5.2: Section: Rewrite Rules,
https://www.gnu.org/software/emacs/manual/html_mono/calc.html#Rewrites-Tutorial
There is the following typo.
In the Exercise-1 shows following:
```
1: [merge, secsqr] 1: [a/x + b/x := (a + b)/x, ... ]
. .
' [merge,sinsqr] RET =
```
You can see, it says that when entering [merge, sinsqr] it becomes
[merge, secsqr].
I believe the `sinsqr` was supposed to be `secsqr`.
(In fact there is no mention of `sinsqr` in the whole manual).
Garid.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62658
; Package
emacs
.
(Thu, 06 Apr 2023 10:21:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 62658 <at> debbugs.gnu.org (full text, mbox):
> From: Garid Zorigoo <garidzorigoo <at> gmail.com>
> Date: Tue, 4 Apr 2023 03:12:22 +0900
>
> In Calc's Manual 2.5.2: Section: Rewrite Rules,
> https://www.gnu.org/software/emacs/manual/html_mono/calc.html#Rewrites-Tutorial
> There is the following typo.
>
> In the Exercise-1 shows following:
>
> ```
> 1: [merge, secsqr] 1: [a/x + b/x := (a + b)/x, ... ]
> . .
>
> ' [merge,sinsqr] RET =
> ```
>
> You can see, it says that when entering [merge, sinsqr] it becomes
> [merge, secsqr].
>
> I believe the `sinsqr` was supposed to be `secsqr`.
> (In fact there is no mention of `sinsqr` in the whole manual).
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.
I'm probably missing something. Could you perhaps show the commands
and keys to type, starting from "emacs -Q", to reproduce the example
and its results?
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62658
; Package
emacs
.
(Fri, 07 Apr 2023 12:47:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 62658 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thanks for the reply
> 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)
Garid
[Message part 2 (text/html, inline)]
[tmpw7vsjq4x-ascii.cast (application/octet-stream, attachment)]
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 08 Apr 2023 16:15:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Garid Zorigoo <garidzorigoo <at> gmail.com>
:
bug acknowledged by developer.
(Sat, 08 Apr 2023 16:15:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 62658-done <at> debbugs.gnu.org (full text, mbox):
> From: Garid Zorigoo <garidzorigoo <at> gmail.com>
> Date: Fri, 7 Apr 2023 21:46:21 +0900
> Cc: 62658 <at> 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.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 07 May 2023 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 43 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.