From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: percent-change Date: Sat, 13 May 2023 22:16:59 +0700 Message-ID: References: <87r0rnxa6v.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1919"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 13 17:17:55 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pxr0N-0000Cv-7A for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 May 2023 17:17:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxqzm-0003pQ-Ow; Sat, 13 May 2023 11:17:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pxqzj-0003p8-H1 for help-gnu-emacs@gnu.org; Sat, 13 May 2023 11:17:15 -0400 Original-Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pxqzh-0003Pf-GI for help-gnu-emacs@gnu.org; Sat, 13 May 2023 11:17:15 -0400 Original-Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3f415a90215so87750905e9.0 for ; Sat, 13 May 2023 08:17:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683991030; x=1686583030; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=PJ2bbG6NraqmcWnyrrYot7bw5ARlL5SGL3W793oFHOw=; b=N3jSxYMFfWe20Oyz2tGw6GPsOkdZuxYoaXvp/RVcQWjDf1aZFA3XWsz9qvtqZXBPTE +53Z6iHz9Cgh3pmjvO9DzU+UuM7xxV50k5ls85synk93mKZEVI2WvmDEUhjfWLPbK/vO qYgcGRs2u+RP+aXkfEzDFMYpgbdF5gIQ30Ir+stq/hGl/eC6uCdfTWelk/1dZALzK3Me q3jvxt0hUnzkGkYlHDhlBwMGJ9QPgKFo4QqK2EbgBy5F2i5Gbg2Bp/tOBLbizC763bTf lRJilQXK2fsdGTyvZH+ILutg154nS3hXpNYe28DVaovEZBNYdWSvtwUc8u8rxCQDy3u7 0Hlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683991030; x=1686583030; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PJ2bbG6NraqmcWnyrrYot7bw5ARlL5SGL3W793oFHOw=; b=YIXbfbzjwGE4mdZ5bIebvyvMwH4lfRMiWn+mi8mMDWmIkAomaYHFg/CoBu7zT650h9 SolaygD7OJMcpi0Q39nu97+KXQ/REufDTuBYYHMPXN9eZ8dHz3zDMvheMnH9PoADAOZP DlvO7c70asmjQVvm843BCmqJX9aT/dO+a4ga3I+pufEQARaAscTZpq1y4In6+kcXHDd9 VL+4uSecj37uGI43sHzj0+COscjYaMIittYuPs0DR3w0cdORiBCXNW+9DID8zJ+RBDSE ncqcrokqUKz6batEzXbCa2OmbMxpPnfs+zye/Thedwcdy5WUR6hDUD6p3DamKPMELXf9 wQkA== X-Gm-Message-State: AC+VfDz0wXx0iozXZqhX2cXsH642XQk/5L88F0PF3v1Ayiu6gssV5PX8 ozfq3iSv2uFK1TuWrzNtn1EZGnys7Pdbi+FgQvkmOCwfUQYriQ== X-Google-Smtp-Source: ACHHUZ7BDYdKJB/X/GKMRgmzSRQ880DxZ/zge4B2YJiahynsBg9LnwLptdp7LXoR10+dbnGdNGDuJmioOkPdMF6vHAU= X-Received: by 2002:a1c:cc11:0:b0:3f4:86:33b with SMTP id h17-20020a1ccc11000000b003f40086033bmr19378478wmb.26.1683991030261; Sat, 13 May 2023 08:17:10 -0700 (PDT) In-Reply-To: <87r0rnxa6v.fsf@dataswamp.org> Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=yurivkhan@gmail.com; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143589 Archived-At: On Sat, 13 May 2023 at 19:41, Emanuel Berg wrote: > > Take a look at this, see examples for intended bahvior. > This was more difficult than I imagined, maybe there is some > simpler way to do it? (defun yk-percent-change (from to) (if (= from to) 0 (/ (- to from) (abs from) 0.01)))