From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#25652: 26.0.50; calc says that cos(1 degree) is 0.54 Date: Wed, 17 May 2017 23:32:12 -0400 Message-ID: <87d1b6j0w3.fsf@users.sourceforge.net> References: <877f51f7ze.fsf@wilson> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1495078273 3889 195.159.176.226 (18 May 2017 03:31:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 18 May 2017 03:31:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: 25652@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 18 05:31:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBC9e-0000tb-3H for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 May 2017 05:31:10 +0200 Original-Received: from localhost ([::1]:51598 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBC9j-0002yC-C2 for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 May 2017 23:31:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBC9a-0002xv-3h for bug-gnu-emacs@gnu.org; Wed, 17 May 2017 23:31:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBC9W-0006MX-V2 for bug-gnu-emacs@gnu.org; Wed, 17 May 2017 23:31:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48944) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dBC9W-0006MT-R6 for bug-gnu-emacs@gnu.org; Wed, 17 May 2017 23:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dBC9W-0000Yf-Iq for bug-gnu-emacs@gnu.org; Wed, 17 May 2017 23:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 May 2017 03:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25652 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 25652-submit@debbugs.gnu.org id=B25652.14950782431181 (code B ref 25652); Thu, 18 May 2017 03:31:02 +0000 Original-Received: (at 25652) by debbugs.gnu.org; 18 May 2017 03:30:43 +0000 Original-Received: from localhost ([127.0.0.1]:51621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBC9D-0000Ik-2C for submit@debbugs.gnu.org; Wed, 17 May 2017 23:30:43 -0400 Original-Received: from mail-io0-f193.google.com ([209.85.223.193]:33247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBC9C-0000DK-7Z for 25652@debbugs.gnu.org; Wed, 17 May 2017 23:30:42 -0400 Original-Received: by mail-io0-f193.google.com with SMTP id m4so3335058ioe.0 for <25652@debbugs.gnu.org>; Wed, 17 May 2017 20:30:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=p/UBKHBvAT63dcptKIjj4uSitC5KXgkCNlX2tqX21EY=; b=gWCmnIngZZQBF/8OBURjsSAT67bCSvdAvX+PV3ADp1X2xBRxOEAMQT1UtfFff/jlty 3lklg1sGCPmUpeMRI9CoQNuoHwfjJNhXnEWBWLCQDzy7BD15LV2qvtmU77AMw0O4s375 CBt68qOJpxnn5p+ZBuEq0UYPZ/iu2amNaRWFzlrNTpm7uokBu8eJMGmuZSxG3vT3Inoj vbiuYWa4OFlgm+RmOO15FMmpuv2h3Rh3uWv+/tqhA82CDoXIG++SpYCSPz0NO1tBhWMj /MiTEB7lYvcvS2smkeEyEN6W533iFftRR3ME/nPkXq5vepPkEhwBrWR/vQ0/IgV5xE8s spvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=p/UBKHBvAT63dcptKIjj4uSitC5KXgkCNlX2tqX21EY=; b=MukujLuzhNugh+ZlseFSr4qYa8twNlrGQL05wNEUtKjfQWqwmIMiMpJg29yAUexY6+ F78M06KlX+G/kj9sysKWIa5iVgS5cg/w0DEYwZUA1IAkuPPbOP9GF/bMp1jDLKswvTYO OLVUN7AfUGict1MgD1DQIZjb+8JcY3fhZcSDfyW9NXTC4fOBsKDG/7I/ecuyz2R0OgoU H8Vhr6xolJofuo/9nm5bM0UlCKwwcxKgcQF1/F/tMXtW+l/Jz8kZVbXa3dmLmCVLE0FS 5j/xgRUJvZLTkMlqhmHO9lYMJaKYmT2tgBitKMN9DwpLq1VR6f3WJ4QZ0bF4GlUG56Qm DGog== X-Gm-Message-State: AODbwcCl4q8FO+GRQcvr1N5hItK6KlH5nEnJMfRIYXaSFkMZzLUeMQNZ S7bUN/wpFJMMFQ== X-Received: by 10.107.62.139 with SMTP id l133mr2417899ioa.213.1495078236627; Wed, 17 May 2017 20:30:36 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id u200sm2041116itb.29.2017.05.17.20.30.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 May 2017 20:30:36 -0700 (PDT) In-Reply-To: (Tino Calancha's message of "Mon, 13 Feb 2017 12:40:05 +0900 (JST)") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:132587 Archived-At: Tino Calancha 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.