[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: percent-change
From: |
Emanuel Berg |
Subject: |
Re: percent-change |
Date: |
Sat, 13 May 2023 18:04:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Yuri Khan 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)))
But how/why does that work if 'from' is 0?
(/ 1 0 0.01) ; 1.0e+INF
What does that mean?
--
underground experts united
https://dataswamp.org/~incal