all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tino Calancha <tino.calancha@gmail.com>
To: 25652-done@debbugs.gnu.org
Subject: bug#25652: 26.0.50; calc says that cos(1 degree) is 0.54
Date: Thu, 18 May 2017 14:51:46 +0900	[thread overview]
Message-ID: <878tlu3e6l.fsf@calancha-pc> (raw)
In-Reply-To: <87d1b6j0w3.fsf@users.sourceforge.net> (npostavs's message of "Wed, 17 May 2017 23:32:12 -0400")

npostavs@users.sourceforge.net writes:

> Tino Calancha <tino.calancha@gmail.com> writes:
>
>> Yes, my commit produced this bug.  We must revert it.  Sorry for that.
>> That commit was to fix Bug#23889.  It would be nice if we can fix Bug#23889 in
>> a new way.
>> In that bug the problem was that, if the user inputs a symbolic expression containning
>> an angle unit, then this unit is overriden by calc-angle-mode while simplifying such
>> expression.
>> That should not happen as mentioned in the manual:
>> (info "(calc) Trigonometric and Hyperbolic Functions")
>>
>> That is,
>> M-x calc RET
>> m d ; Set calc-angle-mode to degrees.
>> ' sin (45 deg) RET
>> u s ; Must insert the value of:  (sin (* 45 pi (/ 180.0)))
>> ;; But instead, inserts the value of: (sin (* 45 (expt (/ pi 180.0) 2)))
>> ;; i.e., it's applying (/ pi 180) twice.
>>
>> I have updated the patch:
>> 1) Revert 713e922243
>>
>> 2) Bind calc-angle-mode to 'rad while simplifying an expression whenever such
>> expression contains an unit angle.  This way, hopefully, the second factor (/ pi 180)
>> won't be applied.
>>
>> Opinions, comments...
>
> I'm not familiar enough with calc to say if this is a good idea or not,
> but I guess you may as well push this now so that we can discover if it
> has any problems sooner rather than later.

Thank you.  I've reverted my buggy fix, and pushed a new fix
for Bug#23889 into master:

Revert:
eab1a6307b09180bd775cfb6bf7330eb5367bbe0
Fix:
c48e539226a062d01b8d5534644fae959506a743





      reply	other threads:[~2017-05-18  5:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08  7:37 bug#25652: 26.0.50; calc says that cos(1 degree) is 0.54 Torsten Bronger
2017-02-08 17:39 ` Eli Zaretskii
2017-02-08 18:52   ` Torsten Bronger
2017-02-08 19:31 ` Óscar Fuentes
2017-02-08 19:36   ` Noam Postavsky
2017-02-09  9:08 ` Torsten Bronger
2017-02-09 14:06   ` npostavs
2017-02-09 18:09     ` Glenn Morris
2017-02-10  6:17       ` Torsten Bronger
2017-02-10  7:59         ` Torsten Bronger
2017-02-11 10:16         ` Torsten Bronger
2017-02-11 14:14           ` npostavs
2017-02-13  3:40 ` Tino Calancha
2017-05-18  3:32   ` npostavs
2017-05-18  5:51     ` Tino Calancha [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

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

  git send-email \
    --in-reply-to=878tlu3e6l.fsf@calancha-pc \
    --to=tino.calancha@gmail.com \
    --cc=25652-done@debbugs.gnu.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.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.