From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28501 invoked by alias); 3 May 2018 15:44:08 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23383 Received: (qmail 3373 invoked by uid 1010); 3 May 2018 15:44:08 -0000 X-Qmail-Scanner-Diagnostics: from mta02.eastlink.ca by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(24.224.136.13):SA:0(-2.6/5.0):. Processed in 2.674309 secs); 03 May 2018 15:44:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: rayandrews@eastlink.ca X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=utf-8; format=flowed X-Authority-Analysis: v=2.3 cv=dfKuI0fe c=1 sm=1 tr=0 a=RnRVsdTsRxS/hkU0yKjOWA==:117 a=RnRVsdTsRxS/hkU0yKjOWA==:17 a=IkcTkHD0fZMA:10 a=pGLkceISAAAA:8 a=_svQtpwBz2W0fIxPlKAA:9 a=QEXdDO2ut3YA:10 X-EL-IP-NOAUTH: 24.207.101.9 Subject: Re: persistance in zcalc funct defs To: zsh-users@zsh.org References: <20180503033801.5111@sparky> <20180503121841.0f21e362@camnpupstephen.cam.scsc.local> From: Ray Andrews Message-id: Date: Thu, 3 May 2018 08:13:59 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 In-reply-to: <20180503121841.0f21e362@camnpupstephen.cam.scsc.local> Content-language: en-CA On 03/05/18 04:18 AM, Peter Stephenson wrote: > On Thu, 03 May 2018 03:38:01 -0700 > "jdh" wrote: >> In zcalc I did the below (The constants are for 360/(2*pi) and it's >> inverse) >> >> ..> function dtor $1 * 0.0174533 >> ..> function rtod $1 * 57.2958 >> What an interesting coincidence, I was doing some trig just last night, and the conversion from degrees to radians was a minor bother, but a bother just the same.  Could we have the choice?  It would seem to be a very simple thing to add: "setopt ZCALC_DEGREES" "setopt ZCALC_RADIANS" ?? ... and of course the internal math would be trivial, but faster and more accurate than belaboring it in one's code.  20 minutes work (he said, with his laughable naivety ;-)